/* ─────────────────────────────────────────────────────────────
   APERTIX · Unified Dark Architectural & Motion Stylesheet
   ───────────────────────────────────────────────────────────── */

#canvas-wash {
  position: fixed;
  inset: 0;
  z-index: -4;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 68% 62% at 88% 12%, var(--wash-top), transparent 68%),
    radial-gradient(ellipse 72% 60% at 12% 90%, var(--wash-bottom), transparent 70%);
}

#dune-horizon {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  opacity: 0.50;
  pointer-events: none;
  transition: opacity 380ms var(--ease);
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.85) 10%,
    #000 22%,
    #000 78%,
    rgba(0, 0, 0, 0.85) 90%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    rgba(0, 0, 0, 0.85) 10%,
    #000 22%,
    #000 78%,
    rgba(0, 0, 0, 0.85) 90%,
    transparent 100%
  );
}

:root[data-theme="light"] #dune-horizon {
  opacity: 0.92;
}

#ambient-tint {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0;
  background-image: radial-gradient(
    ellipse 64% 58% at 50% 64%,
    var(--hover-tint, rgba(232, 224, 213, 0.11)),
    transparent 72%
  );
  transition: opacity 420ms var(--ease);
}

#ambient-tint.is-active {
  opacity: 1;
}

:root[data-theme="light"] #ambient-tint.is-active {
  opacity: 0.42;
}

#grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("assets/sand-grain.png") 0 0 / 160px 160px repeat;
  mix-blend-mode: var(--grain-blend);
  opacity: var(--grain-opacity);
  transition: opacity 380ms var(--ease);
}

#morph-veil {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  border-radius: 12px;
  will-change: transform, opacity;
}

.wrap {
  width: min(var(--max-w), calc(100% - (2 * var(--gutter))));
  margin: 0 auto;
}

/* ── Borderless Zero-Separator Masthead ───────────────────── */
.masthead {
  height: 68px;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px 6px 2px;
  border: 0;
  background: transparent;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--fg);
  cursor: pointer;
}

.brand-mark {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 340ms var(--ease-expo);
}

.brand:hover .brand-mark {
  transform: scale(1.12);
}

.masthead-tabs {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1vw, 14px);
}

.view-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  font: 500 12.5px/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 180ms ease-out;
}

.view-tab:hover,
.view-tab[aria-selected="true"] {
  color: var(--fg);
}

/* Shared Sliding Hairline Rail */
.rail-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  pointer-events: none;
  opacity: 0;
  transition:
    transform 260ms var(--ease),
    width 260ms var(--ease),
    background-color 320ms var(--ease),
    opacity 180ms ease-out;
}

.masthead-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 180ms var(--ease);
}

.theme-toggle:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.theme-icon--moon {
  display: none;
}

:root[data-theme="light"] .theme-icon--sun {
  display: none;
}

:root[data-theme="light"] .theme-icon--moon {
  display: block;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  color: var(--fg);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}

.header-pill:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

/* ── App Stage & Views ────────────────────────────────────── */
.app-stage {
  min-height: calc(100svh - 68px);
  display: flex;
  flex-direction: column;
}

[data-view-panel][hidden] {
  display: none !important;
}

[data-view-panel] {
  animation: view-enter 240ms var(--ease-expo);
}

@keyframes view-enter {
  from { opacity: 0; translate: 0 6px; }
  to { opacity: 1; translate: 0 0; }
}

/* ── Tab 1: Overview (Sketch-Gray Charcoal + 5 Tall Cards) ─ */
.overview-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 2.8svh, 32px) 0 clamp(20px, 3svh, 34px);
}

.overview-view > .wrap {
  margin-block: auto;
}

.overview-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: end;
  margin-bottom: clamp(24px, 3.8svh, 42px);
}

.overview-h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(44px, 5.4vw, 82px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--fg);
  max-width: 11ch;
}

.mask-line {
  display: block;
  overflow: hidden;
}

.mask-line > span {
  display: block;
  animation: line-rise 540ms var(--ease-expo) both;
}

.mask-line:nth-child(2) > span {
  animation-delay: 75ms;
}

@keyframes line-rise {
  from {
    transform: translateY(104%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.overview-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.overview-sub {
  margin: 0;
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.45;
  color: var(--fg-muted);
  max-width: 36ch;
}

.news-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.news-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 9px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--fg);
  font: 500 13px/1.3 var(--body);
  cursor: pointer;
  text-align: left;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 200ms var(--ease);
}

.news-pill:hover {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.news-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}

.news-pill:hover .news-badge {
  background: var(--accent-ink);
  color: var(--accent);
}

/* 5 Tall Architectural Cards + Dimension + Micro-Parallax */
.model-deck {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-block: auto;
}

@keyframes deck-enter {
  from {
    opacity: 0;
    translate: 0 14px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}

.deck-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  perspective: 900px;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  animation: deck-enter 460ms var(--ease-expo) calc(var(--i, 0) * 50ms + 85ms) both;
  transition: opacity 220ms var(--ease), transform 260ms var(--ease-expo);
}

.deck-card:hover,
.deck-card:focus-visible {
  z-index: 3;
}

.model-deck.has-hover .deck-card:not(:hover):not(:focus-visible) {
  opacity: 0.72;
  transform: scale(0.992);
}

.deck-card-3d {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  min-height: clamp(320px, 42svh, 408px);
  padding: 20px 18px 18px;
  border-radius: 12px;
  border: 1px solid var(--card-rest-border);
  background-color: var(--card-rest-bg);
  box-shadow: var(--panel-inset);
  overflow: hidden;
  transform: translate3d(0, var(--lift, 0px), 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: background-color 280ms var(--ease), border-color 240ms var(--ease), box-shadow 300ms var(--ease-expo), transform 340ms var(--ease-expo);
}

.dc-bg-layer {
  position: absolute;
  inset: -24px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--bg-x, 0px), var(--bg-y, 0px), 0) scale(var(--bg-scale, 1.09));
  transition: transform 420ms var(--ease-expo), opacity 320ms var(--ease);
}

.dc-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  filter: saturate(0.96) brightness(0.92);
}

.dc-bg-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(16, 17, 19, 0.84) 0%,
      rgba(16, 17, 19, 0.36) 28%,
      rgba(16, 17, 19, 0.36) 68%,
      rgba(16, 17, 19, 0.88) 100%
    ),
    radial-gradient(ellipse 76% 52% at 50% 52%, rgba(16, 17, 19, 0.72) 0%, rgba(16, 17, 19, 0.18) 88%);
  opacity: 0.62;
}

.dc-sheen {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--gl-x, 50%) var(--gl-y, 42%),
    rgba(255, 255, 255, 0.085) 0%,
    transparent 56%
  );
  transition: opacity 260ms var(--ease);
}

.deck-card.is-tracking .deck-card-3d {
  transition: background-color 280ms var(--ease), border-color 240ms var(--ease), box-shadow 300ms var(--ease-expo);
}

.deck-card.is-tracking .dc-bg-layer {
  transition: opacity 320ms var(--ease);
}

.deck-card.is-tracking .dc-art-wrap,
.deck-card.is-tracking .dc-head,
.deck-card.is-tracking .deck-foot {
  transition: none;
}

.deck-card:hover .deck-card-3d,
.deck-card:focus-visible .deck-card-3d {
  --lift: -8px;
  --fg-scale: 1.08;
  --bg-scale: 1.01;
  background-color: #141517;
  border-color: var(--card-fill, #e8e0d5);
  box-shadow: 0 26px 48px -18px rgba(0, 0, 0, 0.82), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] .deck-card[data-jump-model="oryn"] {
  --card-light-accent: #1f4460;
  --card-light-bg: #e6eef4;
}

:root[data-theme="light"] .deck-card[data-jump-model="cerno"] {
  --card-light-accent: #4c3b28;
  --card-light-bg: #efe8dc;
}

:root[data-theme="light"] .deck-card[data-jump-model="efficientstream"] {
  --card-light-accent: #1f4732;
  --card-light-bg: #e5eee7;
}

:root[data-theme="light"] .deck-card[data-jump-model="veridose"] {
  --card-light-accent: #684222;
  --card-light-bg: #f1e7db;
}

:root[data-theme="light"] .deck-card[data-jump-model="world-models"] {
  --card-light-accent: #2c2b28;
  --card-light-bg: #eae8e2;
}

:root[data-theme="light"] .deck-card:hover .deck-card-3d,
:root[data-theme="light"] .deck-card:focus-visible .deck-card-3d {
  background-color: var(--card-light-bg, #ede7dc);
  color: #161513;
  border-color: var(--card-light-accent, #161513);
  box-shadow: 0 24px 44px -20px rgba(22, 21, 19, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

:root[data-theme="light"] .dc-bg-img {
  opacity: 0.44;
  filter: invert(1) hue-rotate(180deg) saturate(1.15) contrast(1.06) brightness(1.02);
  mix-blend-mode: multiply;
}

:root[data-theme="light"] .dc-bg-veil {
  background:
    linear-gradient(
      to bottom,
      rgba(246, 243, 236, 0.72) 0%,
      rgba(246, 243, 236, 0.24) 28%,
      rgba(246, 243, 236, 0.24) 68%,
      rgba(246, 243, 236, 0.78) 100%
    ),
    radial-gradient(ellipse 76% 52% at 50% 52%, rgba(246, 243, 236, 0.56) 0%, rgba(246, 243, 236, 0.08) 88%);
  opacity: 0.72;
}

:root[data-theme="light"] .dc-sheen {
  background: radial-gradient(
    circle at var(--gl-x, 50%) var(--gl-y, 42%),
    rgba(255, 255, 255, 0.36) 0%,
    transparent 58%
  );
}

:root[data-theme="light"] .deck-card:hover .deck-notch,
:root[data-theme="light"] .deck-card:focus-visible .deck-notch {
  border-color: var(--card-light-accent, #161513);
  color: var(--card-light-accent, #161513);
  background: rgba(247, 244, 238, 0.86);
}

:root[data-theme="light"] .deck-card:hover .deck-role,
:root[data-theme="light"] .deck-card:focus-visible .deck-role {
  color: rgba(22, 21, 19, 0.72);
}

:root[data-theme="light"] .deck-card:hover .deck-title,
:root[data-theme="light"] .deck-card:focus-visible .deck-title {
  color: #161513;
  text-decoration-color: var(--card-light-accent, #161513);
}

:root[data-theme="light"] .deck-card:hover .deck-art,
:root[data-theme="light"] .deck-card:focus-visible .deck-art {
  color: #161513;
  opacity: 1;
  filter: drop-shadow(var(--sh-x, 0px) var(--sh-y, 8px) 10px rgba(22, 21, 19, 0.20));
}

:root[data-theme="light"] .deck-card:hover .deck-foot,
:root[data-theme="light"] .deck-card:focus-visible .deck-foot {
  border-top-color: rgba(22, 21, 19, 0.18);
}

:root[data-theme="light"] .deck-card:hover .deck-metric-label,
:root[data-theme="light"] .deck-card:focus-visible .deck-metric-label {
  color: rgba(22, 21, 19, 0.78);
}

:root[data-theme="light"] .deck-card:hover .deck-metric,
:root[data-theme="light"] .deck-card:focus-visible .deck-metric,
:root[data-theme="light"] .deck-card:hover .deck-arrow,
:root[data-theme="light"] .deck-card:focus-visible .deck-arrow {
  color: var(--card-light-accent, #161513);
}

.deck-card:hover .dc-bg-layer,
.deck-card:focus-visible .dc-bg-layer {
  opacity: 1;
}

.deck-card:hover .dc-sheen,
.deck-card:focus-visible .dc-sheen {
  opacity: 1;
}

.deck-notch {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-bottom-left-radius: 20px;
  border-left: 1px solid var(--card-rest-border);
  border-bottom: 1px solid var(--card-rest-border);
  background: transparent;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-muted);
  transition: border-color 180ms ease-out, color 180ms ease-out, background-color 180ms ease-out;
}

.deck-card:hover .deck-notch,
.deck-card:focus-visible .deck-notch {
  border-color: var(--card-fill, #e8e0d5);
  color: var(--card-fill, #e8e0d5);
  background: rgba(14, 15, 17, 0.78);
}

.dc-head {
  position: relative;
  z-index: 3;
  transform: translate3d(var(--tx-x, 0px), var(--tx-y, 0px), 0);
  transition: transform 340ms var(--ease-expo);
}

.deck-role {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  transition: color 180ms ease-out;
}

.deck-card:hover .deck-role,
.deck-card:focus-visible .deck-role {
  color: rgba(245, 243, 238, 0.84);
}

.deck-title {
  margin-top: 6px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: underline transparent 1.5px;
  text-underline-offset: 4px;
  transition: color 180ms ease-out, text-decoration-color 180ms ease-out;
}

.deck-card:hover .deck-title,
.deck-card:focus-visible .deck-title {
  color: #ffffff;
  text-decoration-color: var(--card-fill, #e8e0d5);
}

.dc-art-wrap {
  position: relative;
  z-index: 3;
  margin: auto 0;
  transform: translate3d(var(--fg-x, 0px), var(--fg-y, 0px), 0) scale(var(--fg-scale, 1));
  transition: transform 340ms var(--ease-expo);
}

.deck-art {
  width: 100%;
  height: 128px;
  display: block;
  color: var(--fg);
  opacity: 0.84;
  filter: none;
  transition: color 180ms ease-out, opacity 200ms ease-out, filter 260ms var(--ease);
}

.deck-card:hover .deck-art,
.deck-card:focus-visible .deck-art {
  color: #f8f6f2;
  opacity: 1;
  filter: drop-shadow(var(--sh-x, 0px) var(--sh-y, 12px) 16px rgba(0, 0, 0, 0.92));
}

.deck-foot {
  position: relative;
  z-index: 3;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translate3d(var(--tx-x, 0px), var(--tx-y, 0px), 0);
  transition: border-color 180ms ease-out, transform 340ms var(--ease-expo);
}

.deck-foot-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.deck-metric {
  font-family: var(--display);
  font-size: clamp(23px, 2.15vw, 30px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--fg);
  transition: color 180ms ease-out;
}

.deck-metric-label {
  font-size: 12.5px;
  line-height: 1.3;
  min-height: 2.6em;
  color: var(--fg-muted);
  transition: color 180ms ease-out;
}

.deck-arrow {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--fg);
  transition: color 180ms ease-out, transform 220ms var(--ease-expo);
}

.deck-card:hover .deck-foot,
.deck-card:focus-visible .deck-foot {
  border-top-color: rgba(245, 243, 238, 0.28);
}

.deck-card:hover .deck-metric-label,
.deck-card:focus-visible .deck-metric-label {
  color: rgba(245, 243, 238, 0.88);
}

.deck-card:hover .deck-metric,
.deck-card:focus-visible .deck-metric,
.deck-card:hover .deck-arrow,
.deck-card:focus-visible .deck-arrow {
  color: var(--card-fill, #e8e0d5);
}

.deck-card:hover .deck-arrow,
.deck-card:focus-visible .deck-arrow {
  transform: translateX(5px);
}

/* Living Card SVG Kinetics (Fires smoothly on hover/focus) */
.cerno-pulse {
  stroke-dasharray: 30 72;
  stroke-dashoffset: 100;
  opacity: 0;
}

.deck-card:hover .cerno-pulse,
.deck-card:focus-visible .cerno-pulse {
  opacity: 1;
  animation: cerno-sweep 1.25s var(--ease-expo) infinite;
}

.oryn-ray {
  stroke-dasharray: 28 74;
  stroke-dashoffset: 100;
  opacity: 0;
}

.deck-card:hover .oryn-ray,
.deck-card:focus-visible .oryn-ray {
  opacity: 1;
  animation: cerno-sweep 1.25s var(--ease-expo) calc(var(--r, 0) * 110ms) infinite;
}

@keyframes cerno-sweep {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: -102; }
}

.cerno-ring,
.oryn-outer,
.oryn-mid,
.oryn-ticks,
.pharma-ring {
  transform-box: fill-box;
  transform-origin: center;
}

.deck-card:hover .cerno-ring,
.deck-card:focus-visible .cerno-ring {
  animation: node-pulse 1.25s var(--ease-expo) infinite;
}

@keyframes node-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.22); }
}

.oryn-outer,
.oryn-mid {
  transition: transform 320ms var(--ease-expo);
}

.oryn-ticks {
  transition: transform 320ms var(--ease-expo);
}

.deck-card:hover .oryn-outer,
.deck-card:focus-visible .oryn-outer {
  animation: spin-cw 14s linear infinite;
}

.deck-card:hover .oryn-mid,
.deck-card:focus-visible .oryn-mid {
  animation: spin-ccw 10s linear infinite;
}

.deck-card:hover .oryn-ticks,
.deck-card:focus-visible .oryn-ticks {
  transform: scale(0.92);
}

@keyframes spin-cw {
  to { transform: rotate(360deg); }
}

@keyframes spin-ccw {
  to { transform: rotate(-360deg); }
}

.stream-base-curve {
  stroke-dasharray: 5 5;
}

.deck-card:hover .stream-base-curve,
.deck-card:focus-visible .stream-base-curve {
  animation: dash-drift 2s linear infinite;
}

@keyframes dash-drift {
  to { stroke-dashoffset: -20; }
}

.stream-beacon {
  opacity: 0;
}

.deck-card:hover .stream-beacon,
.deck-card:focus-visible .stream-beacon {
  opacity: 1;
  animation: stream-glide 1.65s var(--ease) infinite;
}

@keyframes stream-glide {
  0% { transform: translateX(0px); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(172px); opacity: 0; }
}

.pharma-scan {
  opacity: 0.72;
}

.deck-card:hover .pharma-scan,
.deck-card:focus-visible .pharma-scan {
  opacity: 1;
  animation: pharma-scan-sweep 1.8s var(--ease) infinite;
}

@keyframes pharma-scan-sweep {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(36px); }
}

.pharma-pulse {
  stroke-dasharray: 28 74;
  stroke-dashoffset: 100;
  opacity: 0;
}

.deck-card:hover .pharma-pulse,
.deck-card:focus-visible .pharma-pulse {
  opacity: 1;
  animation: cerno-sweep 1.3s var(--ease-expo) infinite;
}

.deck-card:hover .pharma-ring,
.deck-card:focus-visible .pharma-ring {
  animation: node-pulse 1.5s var(--ease) infinite;
}

.world-arc {
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

.deck-card:hover .world-arc,
.deck-card:focus-visible .world-arc {
  animation: world-trace 780ms var(--ease-expo) both;
}

@keyframes world-trace {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}

/* ── Tab 2: Models (Unified Dark Charcoal + Architectural Slabs) */
.model-subnav-wrap {
  padding: 6px 0 18px;
}

.model-subnav {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: var(--well-bg);
  border: 1px solid var(--panel-border-soft);
}

.sub-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--fg-muted);
  cursor: pointer;
  transition:
    color 180ms ease-out,
    background-color 200ms var(--ease),
    border-color 200ms var(--ease);
}

.sub-tab-idx {
  font-size: 10.5px;
  opacity: 0.6;
  transition: color 180ms ease-out, opacity 180ms ease-out;
}

.sub-tab:hover {
  color: var(--fg);
  background: var(--subtab-hover-bg);
}

.sub-tab[aria-selected="true"] {
  color: var(--fg);
  font-weight: 500;
  background: var(--subtab-active-bg);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

.sub-tab[aria-selected="true"] .sub-tab-idx {
  color: var(--accent);
  opacity: 1;
}

.model-stage {
  padding: clamp(6px, 1.5svh, 16px) 0 48px;
}

.model-stage.is-dir-next {
  animation: stage-from-right 280ms var(--ease-expo) both;
}

.model-stage.is-dir-prev {
  animation: stage-from-left 280ms var(--ease-expo) both;
}

@keyframes stage-from-right {
  from { opacity: 0; translate: 18px 0; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes stage-from-left {
  from { opacity: 0; translate: -18px 0; }
  to { opacity: 1; translate: 0 0; }
}

.model-hero-slab {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(20px, 4vw, 52px);
  align-items: end;
  padding: clamp(24px, 3.4vw, 36px) clamp(24px, 3.4vw, 38px);
  border-radius: 16px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-inset);
}

.hero-art-wash {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.24;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
}

:root[data-theme="light"] .hero-art-wash {
  opacity: 0.16;
  mix-blend-mode: multiply;
  filter: invert(1) hue-rotate(180deg) saturate(0.85) contrast(1.06);
}

.hero-art-wash img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-notch {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-bottom-left-radius: 20px;
  border-left: 1px solid var(--panel-border-strong);
  border-bottom: 1px solid var(--panel-border-strong);
  background: transparent;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11.5px;
  display: grid;
  place-items: center;
}

.hero-slab-main {
  position: relative;
  z-index: 1;
}

.model-meta {
  padding-right: 42px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.model-display {
  margin: 10px 0 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(46px, 5.8vw, 88px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--fg);
}

.model-oneliner {
  position: relative;
  z-index: 1;
  margin: 0;
  padding-right: 28px;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.42;
  color: var(--fg);
  max-width: 34ch;
}

.model-body-grid {
  margin-top: clamp(22px, 3.2svh, 34px);
  display: grid;
  grid-template-columns: minmax(0, 0.38fr) minmax(0, 0.62fr);
  gap: clamp(24px, 3.8vw, 48px);
  align-items: start;
}

.hero-stats-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@keyframes stat-enter {
  from { opacity: 0; translate: 0 10px; }
  to { opacity: 1; translate: 0 0; }
}

.stat-slab {
  position: relative;
  padding: 20px 22px 20px 24px;
  border-radius: 14px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border-soft);
  box-shadow: var(--panel-inset-soft);
  overflow: hidden;
  animation: stat-enter 380ms var(--ease-expo) calc(var(--i, 0) * 55ms + 40ms) both;
}

.stat-slab::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  bottom: 18px;
  width: 2.5px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.82;
}

.hero-stat-val {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(44px, 4.8vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.hero-stat-lbl {
  margin-top: 8px;
  font-size: 14.5px;
  color: var(--fg-muted);
  max-width: 28ch;
}

.stage-actions {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.stage-module {
  margin-top: 18px;
  padding: clamp(18px, 2.4vw, 24px);
  border-radius: 14px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border-soft);
  box-shadow: var(--panel-inset-soft);
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--fg);
  font: 500 13.5px/1 var(--body);
  cursor: pointer;
  text-decoration: none;
  align-self: flex-start;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}

.pill-btn:hover {
  background: var(--pill-bg);
  color: var(--pill-fg);
  border-color: var(--pill-bg);
}

.pill-btn--solid {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.pill-btn--solid:hover {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule-strong);
}

.next-model-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 4px;
  border: 0;
  background: transparent;
  color: var(--fg-muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: color 180ms ease-out, transform 200ms var(--ease-expo);
}

.next-model-btn:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* Model Signature Visuals (Right 62%) */
.visual-kicker {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.arch-bars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.arch-bar-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
  font-size: 15px;
}

.arch-bar-label {
  color: var(--fg-muted);
}

.arch-bar-label.is-ours {
  color: var(--fg);
  font-weight: 600;
}

.arch-bar-val {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--fg-muted);
}

.arch-bar-val.is-ours {
  color: var(--accent);
  font-weight: 500;
}

.arch-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bar-track);
  overflow: hidden;
}

.arch-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--bar-other);
  transform-origin: left center;
  animation: bar-grow 540ms var(--ease-expo) both;
}

.arch-fill.is-ours {
  background: var(--accent);
}

@keyframes bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.visual-note {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg-muted);
}

/* Cerno Interactive 3-Scenario Pass Selector + Live Decision Fork */
.cerno-scenarios {
  margin-bottom: 0;
}

.cerno-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scenario-pill {
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--rule-strong);
  background: transparent;
  color: var(--fg-muted);
  font: 500 12.5px/1 var(--body);
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease);
}

.scenario-pill:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.scenario-pill[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.cerno-verdict {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--well-bg);
  border: 1px solid var(--panel-border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px auto;
  gap: 12px 16px;
  align-items: center;
}

.cerno-v-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.cerno-v-input {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--fg);
}

.cerno-fork-svg {
  width: 118px;
  height: 76px;
  display: block;
}

.fork-branch {
  stroke: var(--rule-strong);
  stroke-width: 1.25;
  transition: stroke 200ms ease-out;
}

.fork-branch.is-active-branch {
  stroke: var(--accent);
  stroke-width: 2;
}

.fork-node {
  stroke: var(--rule-strong);
  stroke-width: 1.25;
  fill: none;
}

.fork-node.is-active-node {
  stroke: var(--accent);
  fill: var(--accent);
}

.cerno-fork-pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 28 76;
  stroke-dashoffset: 100;
}

.cerno-fork-pulse.is-firing {
  animation: fork-fire 480ms var(--ease-expo) forwards;
}

@keyframes fork-fire {
  from { stroke-dashoffset: 100; opacity: 1; }
  to { stroke-dashoffset: -102; opacity: 0.35; }
}

.cerno-v-outcome {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.cerno-v-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.cerno-v-action {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg);
}

/* Cinema Frame & Poster / Lazy Video Viewport */
.cinema-frame {
  padding: 10px;
  border-radius: 16px;
  background: var(--well-bg);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--cinema-shadow);
  transition: border-color 240ms var(--ease);
}

:root[data-theme="light"] .cinema-frame {
  background: var(--surface-elev);
  border-color: var(--panel-border-strong);
}

.cinema-frame:hover {
  border-color: var(--cinema-hover-border);
}

.cinema-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  color: var(--fg-muted);
}

.cinema-bar-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cinema-bar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cinema-stage {
  position: relative;
  border-radius: 10px;
  border: 1px solid rgba(245, 243, 238, 0.14);
  background: #0b0b0a;
  color: #f5f3ee;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  cursor: pointer;
}

.cinema-poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
  transition: transform 480ms var(--ease-expo), opacity 240ms var(--ease);
}

.cinema-frame:hover .cinema-poster-img {
  transform: scale(1.028);
  opacity: 1;
}

.cinema-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.78) 0%,
    rgba(10, 10, 10, 0.24) 36%,
    transparent 65%
  );
}

.cinema-corner {
  position: absolute;
  width: 12px;
  height: 12px;
  pointer-events: none;
  z-index: 2;
  opacity: 0.45;
  transition: opacity 220ms var(--ease);
}

.cinema-frame:hover .cinema-corner {
  opacity: 0.9;
}

.cinema-corner--tl {
  top: 10px;
  left: 10px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.cinema-corner--tr {
  top: 10px;
  right: 10px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.cinema-corner--bl {
  bottom: 10px;
  left: 10px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.cinema-corner--br {
  bottom: 10px;
  right: 10px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

:root[data-theme="light"] .cinema-corner {
  border-color: rgba(245, 243, 238, 0.72);
}

.cinema-play-btn {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: 500 13.5px/1 var(--body);
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42);
  transition: transform 200ms var(--ease-expo), background-color 180ms ease-out, color 180ms ease-out;
}

:root[data-theme="light"] .cinema-play-btn {
  border-color: #f5f3ee;
  background: #f5f3ee;
  color: #0c0b0b;
}

.cinema-play-btn:hover,
.cinema-frame:hover .cinema-play-btn {
  transform: translateY(-2px);
}

.cinema-play-btn:hover {
  background: rgba(14, 14, 13, 0.84);
  color: #f5f3ee;
  border-color: #f5f3ee;
}

.cinema-stage.is-playing {
  cursor: default;
}

.cinema-stage.is-playing .cinema-corner {
  opacity: 0;
}

.cinema-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0b0b0a;
}

.cinema-frame + .visual-note + .cerno-scenarios,
.cinema-frame + .visual-note + .stream-graph-box {
  margin-top: 22px;
}

/* Oryn 4-capability grid & 3-part Sequential Pipeline Bar */
.oryn-caps {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.oryn-cap {
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid var(--panel-border-soft);
  background: var(--surface-elev);
  box-shadow: var(--panel-inset-soft);
}

.oryn-cap-name {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.oryn-cap-detail {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--fg-muted);
}

.oryn-timing-label {
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.oryn-timing {
  margin-top: 14px;
}

.oryn-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
}

.oryn-seg-0,
.oryn-seg-1,
.oryn-seg-2 {
  transform-origin: left center;
  animation: bar-grow 420ms var(--ease-expo) both;
}

.oryn-seg-0 {
  background: var(--seg-a);
  animation-delay: 0ms;
}

.oryn-seg-1 {
  background: var(--accent);
  animation-delay: 140ms;
}

.oryn-seg-2 {
  background: var(--seg-b);
  animation-delay: 520ms;
}

.oryn-legend {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-muted);
}

.oryn-legend strong {
  color: var(--fg);
  font-weight: 500;
}

/* EfficientStream 1px SVG curve + 1 FPS live pulse + 0-60 min scrubber */
.stream-graph-box {
  border-radius: 14px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border-soft);
  box-shadow: var(--panel-inset-soft);
  padding: clamp(18px, 2.5vw, 26px);
}

.stream-svg {
  width: 100%;
  height: auto;
  display: block;
}

.stream-live-ping {
  fill: var(--accent);
  opacity: 0.72;
  animation: stream-flat-pulse 2.2s linear infinite;
}

@keyframes stream-flat-pulse {
  0% { transform: translateX(0px); opacity: 0; }
  12% { opacity: 0.9; }
  88% { opacity: 0.9; }
  100% { transform: translateX(552px); opacity: 0; }
}

.stream-scrubber {
  margin-top: 16px;
  padding: 13px 16px;
  border-radius: 10px;
  background: var(--well-bg);
  border: 1px solid var(--well-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stream-scrub-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-family: var(--mono);
  font-size: 12px;
}

.stream-scrub-min {
  color: var(--accent);
  font-weight: 500;
}

.stream-scrub-vals {
  color: var(--fg-muted);
}

.stream-scrub-vals strong {
  color: var(--fg);
  font-weight: 500;
}

.stream-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 1.5px;
  background: var(--rule-strong);
  border-radius: 999px;
  cursor: pointer;
}

.stream-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
  transition: transform 140ms var(--ease);
}

.stream-range::-webkit-slider-thumb:hover {
  transform: scale(1.16);
}

.stream-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  cursor: pointer;
}

/* VeriDose 3-Stage On-Device Clinical Verification Pipeline */
.pharma-stages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pharma-stage-row {
  padding: 13px 15px;
  border-radius: 10px;
  background: var(--well-bg);
  border: 1px solid var(--well-border);
}

.pharma-stage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.pharma-stage-title {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.pharma-stage-step {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  opacity: 0.88;
}

.pharma-stage-name {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--fg);
}

.pharma-stage-metric {
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}

.pharma-stage-detail {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--fg-muted);
}

/* World 2 crisp cards + 60-Step DARC Solver Strip */
.world-mini-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.world-mini-cell {
  padding: 15px 17px;
  border-radius: 12px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border-soft);
  box-shadow: var(--panel-inset-soft);
}

.world-mini-k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.world-mini-v {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 500;
  color: var(--fg);
}

.darc-strip {
  position: relative;
  margin-top: 14px;
  padding: 15px 17px;
  border-radius: 14px;
  border: 1px solid var(--panel-border-soft);
  background: var(--surface-elev);
  box-shadow: var(--panel-inset-soft);
  overflow: hidden;
}

.darc-strip-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.darc-strip-head strong {
  color: var(--accent);
  font-weight: 500;
}

.darc-ticks {
  position: relative;
  display: grid;
  grid-template-columns: repeat(60, minmax(0, 1fr));
  gap: clamp(1px, 0.25vw, 2px);
  align-items: end;
  height: 22px;
  margin-top: 10px;
}

.darc-ticks::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--scan-sheen), transparent);
  transform: translateX(-100%);
  animation: solver-scan 3.4s linear infinite;
  pointer-events: none;
}

@keyframes solver-scan {
  to { transform: translateX(100%); }
}

.darc-tick {
  border-radius: 1px;
  height: 11px;
  background: var(--bar-other);
}

.darc-tick.is-computed {
  height: 21px;
  background: var(--accent);
}

/* ── Tab 3: Releases (Cohesive Dark Sticky Preview + Ledger) */
.releases-view {
  padding: clamp(20px, 3.5svh, 40px) 0 56px;
}

.releases-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.39fr) minmax(0, 0.61fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: start;
}

@keyframes preview-rise {
  from { opacity: 0; translate: 0 8px; }
  to { opacity: 1; translate: 0 0; }
}

.preview-card {
  position: sticky;
  top: 24px;
  border-radius: 16px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-inset-soft);
  padding: clamp(22px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-card.is-swapping {
  animation: preview-rise 220ms var(--ease-expo) both;
}

.preview-kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.preview-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--fg);
}

.preview-summary {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-muted);
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.preview-stats > div {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--well-bg);
  border: 1px solid var(--well-border);
}

.p-stat-val {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
}

.p-stat-lbl {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-muted);
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}

.ledger-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.ledger-title-group {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.ledger-h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 4.6vw, 66px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  color: var(--fg);
}

.count-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  flex-shrink: 0;
}

.filter-strip {
  position: relative;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 180ms ease-out;
}

.filter-link:hover,
.filter-link[aria-pressed="true"] {
  color: var(--fg);
}

.filter-link[aria-pressed="true"] {
  font-weight: 500;
}

.ledger-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ledger-item {
  width: 100%;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  min-height: 62px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--ledger-rest-bg);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background-color 180ms var(--ease),
    border-color 180ms var(--ease);
}

.ledger-item:hover,
.ledger-item:focus-visible,
.ledger-item.is-active {
  background: var(--ledger-active-bg);
  border-color: var(--panel-border-strong);
}

.ledger-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.35);
  transition: opacity 160ms ease-out, transform 200ms var(--ease-spring);
}

.ledger-item:hover .ledger-dot,
.ledger-item:focus-visible .ledger-dot,
.ledger-item.is-active .ledger-dot {
  opacity: 1;
  transform: scale(1);
}

.ledger-headline {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  transition: transform 200ms var(--ease);
}

.ledger-item:hover .ledger-headline,
.ledger-item.is-active .ledger-headline {
  transform: translateX(4px);
}

.ledger-metric {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg-muted);
  white-space: nowrap;
}

.ledger-open {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg);
  white-space: nowrap;
}

/* ── Tab 4: Team (Founders Hero + Optical Bridge + Pedigree) */
.team-view {
  padding: clamp(20px, 3svh, 36px) 0 56px;
}

.team-row {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.6vw, 28px);
}

.member {
  position: relative;
  padding: clamp(18px, 2.2vw, 24px);
  border-radius: 16px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-inset);
  display: grid;
  grid-template-columns: 204px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 240ms var(--ease), box-shadow 300ms var(--ease-expo);
}

.member:hover,
.member:focus-visible,
.member.is-active {
  border-color: color-mix(in srgb, var(--member-accent, var(--accent)) 55%, transparent);
}

.member:focus-visible {
  outline: 1px solid var(--member-accent, var(--accent));
  outline-offset: 6px;
}

.member-notch {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-bottom-left-radius: 20px;
  border-left: 1px solid var(--panel-border-strong);
  border-bottom: 1px solid var(--panel-border-strong);
  background: transparent;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-muted);
  transition: border-color 180ms ease-out, color 180ms ease-out;
}

.member:hover .member-notch,
.member:focus-visible .member-notch,
.member.is-active .member-notch {
  border-color: color-mix(in srgb, var(--member-accent, var(--accent)) 60%, transparent);
  color: var(--member-accent, var(--accent));
}

.member:nth-child(1) { --i: 0; --member-accent: #d5e1ea; }
.member:nth-child(2) { --i: 1; --member-accent: #e8e0d5; }

:root[data-theme="light"] .member:nth-child(1) { --member-accent: #1f4460; }
:root[data-theme="light"] .member:nth-child(2) { --member-accent: #684222; }

.member-stage {
  width: 204px;
  aspect-ratio: 4 / 5;
  perspective: 800px;
}

.section-bridge {
  margin: clamp(32px, 4.8svh, 52px) 0 clamp(24px, 3.6svh, 38px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
}

.bridge-line {
  height: 1px;
}

.bridge-line--l {
  background: linear-gradient(90deg, transparent 0%, var(--bridge-rule) 100%);
}

.bridge-line--r {
  background: linear-gradient(90deg, var(--bridge-rule) 0%, transparent 100%);
}

.bridge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.bridge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.8;
}

.team-pedigree {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(22px, 3.4vw, 44px);
  align-items: center;
}

.team-lineage {
  margin: 0;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.34;
  letter-spacing: -0.02em;
  max-width: 34ch;
  color: var(--fg);
}

.lineage-chips {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lineage-chip {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}

.team-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.team-stat-tile {
  position: relative;
  padding: 18px 20px 18px 22px;
  border-radius: 14px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border-soft);
  box-shadow: var(--panel-inset-soft);
}

.team-stat-tile::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 2px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.72;
}

.team-stat-val {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 3.1vw, 46px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--accent);
}

.team-stat-lbl {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.member-card-3d {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  border: 1px solid var(--rule-strong);
  background: #141517;
  overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: border-color 240ms var(--ease), box-shadow 300ms var(--ease-expo), transform 340ms var(--ease-expo);
}

.mp-bg-layer {
  position: absolute;
  inset: -22px;
  z-index: 1;
  pointer-events: none;
  transform: translate3d(var(--bg-x, 0px), var(--bg-y, 0px), 0) scale(var(--bg-scale, 1.08));
  transition: transform 420ms var(--ease-expo);
}

.mp-bg-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.14;
  filter: saturate(0.35) brightness(0.72);
  transition: opacity 380ms var(--ease), filter 420ms var(--ease);
}

.mp-bg-veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(20, 21, 23, 0.1) 0%, rgba(20, 21, 23, 0.62) 85%);
  opacity: 0.9;
  transition: opacity 360ms var(--ease);
}

.mp-subject-wrap {
  position: absolute;
  left: -8%;
  bottom: -10%;
  width: 116%;
  height: 110%;
  z-index: 3;
  pointer-events: none;
  transform: translate3d(var(--fg-x, 0px), var(--fg-y, 0px), 0) scale(var(--fg-scale, 1));
  transition: transform 340ms var(--ease-expo);
}

.mp-subject {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: grayscale(82%) contrast(1.06) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
  transition: filter 360ms var(--ease);
}

.mp-sheen {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    circle at var(--gl-x, 50%) var(--gl-y, 30%),
    rgba(255, 255, 255, 0.085) 0%,
    transparent 56%
  );
  transition: opacity 260ms var(--ease);
}

.member.is-tracking .member-card-3d {
  transition: border-color 240ms var(--ease), box-shadow 300ms var(--ease-expo);
}

.member.is-tracking .mp-bg-layer,
.member.is-tracking .mp-subject-wrap {
  transition: none;
}

.member:hover,
.member:focus-visible {
  --fg-scale: 1.09;
  --bg-scale: 1;
}

.member.is-active {
  --rx: 3deg;
  --ry: 6.5deg;
  --fg-x: 11px;
  --fg-y: -3px;
  --fg-scale: 1.09;
  --bg-x: -11px;
  --bg-y: 4px;
  --bg-scale: 1;
  --sh-x: -14px;
  --sh-y: 16px;
  --gl-x: 58%;
  --gl-y: 40%;
}

.member:hover .member-card-3d,
.member:focus-visible .member-card-3d,
.member.is-active .member-card-3d {
  border-color: var(--member-accent, var(--accent));
  box-shadow: 0 24px 44px -20px rgba(0, 0, 0, 0.8);
}

:root[data-theme="light"] .member:hover .member-card-3d,
:root[data-theme="light"] .member:focus-visible .member-card-3d,
:root[data-theme="light"] .member.is-active .member-card-3d {
  box-shadow: 0 22px 42px -18px rgba(22, 21, 19, 0.36);
}

.member:hover .mp-bg-img,
.member:focus-visible .mp-bg-img,
.member.is-active .mp-bg-img {
  opacity: 0.96;
  filter: saturate(0.95) brightness(0.95);
}

.member:hover .mp-bg-veil,
.member:focus-visible .mp-bg-veil,
.member.is-active .mp-bg-veil {
  opacity: 0.34;
}

.member:hover .mp-sheen,
.member:focus-visible .mp-sheen,
.member.is-active .mp-sheen {
  opacity: 1;
}

.member:hover .mp-subject,
.member:focus-visible .mp-subject,
.member.is-active .mp-subject {
  filter: grayscale(0%) contrast(1.04) drop-shadow(var(--sh-x, 0px) var(--sh-y, 16px) 24px rgba(0, 0, 0, 0.88));
}

.member-body {
  padding-top: 2px;
  padding-right: 34px;
}

.member-role {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.member-name {
  margin: 8px 0 0;
  font-size: clamp(22px, 1.9vw, 26px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--fg);
}

.member-bio {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--fg-muted);
}

.obsidian-cta {
  position: relative;
  margin-top: clamp(32px, 5svh, 52px);
  padding: clamp(28px, 4vw, 44px);
  border-radius: 16px;
  background: var(--surface-elev);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-inset-soft);
  color: var(--fg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  overflow: hidden;
}

.cta-corner {
  position: absolute;
  width: 11px;
  height: 11px;
  pointer-events: none;
  opacity: 0.42;
}

.cta-corner--tl {
  top: 11px;
  left: 11px;
  border-top: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.cta-corner--tr {
  top: 11px;
  right: 11px;
  border-top: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.cta-corner--bl {
  bottom: 11px;
  left: 11px;
  border-bottom: 1px solid var(--accent);
  border-left: 1px solid var(--accent);
}

.cta-corner--br {
  bottom: 11px;
  right: 11px;
  border-bottom: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.obsidian-cta h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.cta-white-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  transition: background-color 180ms ease-out, color 180ms ease-out, transform 180ms var(--ease);
}

.cta-white-pill:hover {
  background: transparent;
  color: var(--fg);
  transform: translateY(-1px);
}

/* ── Dialogs (Full Benchmarks & Video / Dispatch Player) ──── */
dialog.modal {
  width: min(880px, calc(100vw - 28px));
  max-height: calc(100svh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--dialog-border);
  border-radius: 14px;
  background: var(--dialog-bg);
  color: var(--dialog-fg);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

dialog.modal::backdrop {
  background: var(--dialog-backdrop);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px 14px;
  border-bottom: 1px solid var(--rule);
}

.modal-kicker {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

.modal-title {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.modal-body {
  padding: 20px 24px 26px;
  overflow-y: auto;
  max-height: calc(100svh - 120px);
}

.spec-table-wrap {
  overflow-x: auto;
  margin-bottom: 18px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.spec-table th,
.spec-table td {
  padding: 9px 8px;
  text-align: right;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}

.spec-table th:first-child,
.spec-table td:first-child {
  text-align: left;
  padding-left: 0;
}

.spec-table th {
  font-family: var(--mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.spec-table tr.is-ours td {
  font-weight: 600;
  color: var(--accent);
}

.spec-rows {
  border-top: 1px solid var(--rule);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13.5px;
}

.spec-k {
  opacity: 0.65;
}

.spec-v {
  font-family: var(--mono);
  text-align: right;
}

.modal-video-wrap {
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--rule-strong);
  background: var(--well-bg);
  overflow: hidden;
}

.modal-video-wrap video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60svh;
  border-radius: 8px;
  background: #0b0b0a;
}

.modal-prose p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.84;
}

/* ── Responsive Breakpoints ───────────────────────────────── */
@media (max-width: 1080px) {
  .model-deck {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .deck-card-3d {
    min-height: 270px;
  }
}

@media (max-width: 960px) {
  .overview-top,
  .model-hero-slab,
  .model-body-grid,
  .releases-grid,
  .team-row,
  .team-pedigree {
    grid-template-columns: 1fr;
  }
  .model-oneliner {
    padding-right: 0;
  }
  .preview-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .masthead {
    height: auto;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    padding: 10px 16px 6px;
    gap: 4px 12px;
  }
  .masthead-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }
  .view-tab {
    padding: 6px 6px;
    font-size: 11.5px;
    letter-spacing: 0.08em;
    min-height: 40px;
  }
  .masthead-actions {
    gap: 8px;
  }
  .theme-toggle {
    width: 36px;
    height: 36px;
  }
  .header-pill {
    padding: 6px 12px;
    font-size: 11px;
    min-height: 36px;
  }
  .model-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .model-hero-slab {
    padding: 20px 18px;
  }
  .cerno-verdict {
    grid-template-columns: 1fr;
  }
  .cerno-v-outcome {
    text-align: left;
    align-items: flex-start;
  }
  .world-mini-grid {
    grid-template-columns: 1fr;
  }
  .ledger-item {
    grid-template-columns: 10px minmax(0, 1fr) auto;
    gap: 10px;
  }
  .ledger-open {
    display: none;
  }
  .spec-row {
    flex-direction: column;
    gap: 4px;
  }
  .spec-v {
    text-align: left;
  }
  .member {
    grid-template-columns: 144px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
  }
  .member-stage {
    width: 144px;
  }
}

@media (max-width: 480px) {
  .model-deck {
    grid-template-columns: 1fr;
  }
  .deck-card-3d {
    min-height: 230px;
  }
  .deck-metric-label {
    min-height: 0;
  }
  .oryn-caps {
    grid-template-columns: 1fr;
  }
  .member {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 14px;
  }
  .member-stage {
    width: 124px;
  }
  .team-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
