/* ==========================================================================
   nuclide-research.com/zoe/zoe-room.css
   Interactive Zoe Conversation Room (100% Offline Research Partner Workspace)
   Nocturnal Obsidian + Daylight Vellum | Strict CSP 'self' | Zero Overflow
   ========================================================================== */

body.zr-body {
  background: var(--zs-bg);
  color: var(--zs-ink);
}

/* ==========================================================================
   ROOM HEADER CARD
   ========================================================================== */
.zr-hero {
  padding: 40px 0 48px;
  background:
    radial-gradient(ellipse 56% 48% at 16% 12%, rgba(225, 29, 72, 0.1), transparent 70%),
    radial-gradient(ellipse 46% 40% at 84% 18%, rgba(20, 184, 166, 0.07), transparent 68%),
    var(--zs-bg);
}

body[data-theme="vellum"] .zr-hero {
  background:
    radial-gradient(ellipse 56% 48% at 16% 12%, rgba(190, 18, 60, 0.055), transparent 70%),
    radial-gradient(ellipse 46% 40% at 84% 18%, rgba(15, 118, 110, 0.04), transparent 68%),
    var(--zs-bg);
}

.zr-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  border-radius: 16px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-window), var(--zs-specular);
  overflow: hidden;
}

.zr-folio-page {
  padding: 32px 34px;
  min-width: 0;
}

.zr-folio-spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 10px;
  border-left: 1px solid var(--zs-rule);
  border-right: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  box-shadow: inset 6px 0 14px -10px rgba(0, 0, 0, 0.45), inset -6px 0 14px -10px rgba(0, 0, 0, 0.45);
}

body[data-theme="vellum"] .zr-folio-spine {
  box-shadow: inset 6px 0 14px -10px rgba(9, 9, 11, 0.14), inset -6px 0 14px -10px rgba(9, 9, 11, 0.14);
}

.zr-spine-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--zs-mono);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  color: var(--zs-ink-soft);
  user-select: none;
}

.zr-hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  min-width: 0;
}

.zr-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.zr-emblem {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
}

.zr-hero-copy h1,
.zr-workspace-head h2,
.zr-inv-head h2 {
  font-family: var(--font-serif, "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif);
}

.zr-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.15rem);
  font-weight: 680;
  line-height: 1.08;
  letter-spacing: -0.028em;
  color: var(--zs-ink);
}

.zr-subtitle {
  margin: 0;
  font-size: clamp(1.06rem, 1.7vw, 1.24rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--zs-accent-soft);
}

.zr-lead {
  margin: 0;
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.62;
  color: var(--zs-ink-soft);
}

.zr-lead strong {
  color: var(--zs-ink);
}

.zr-hero-points {
  margin: 2px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 0.89rem;
  line-height: 1.5;
  color: var(--zs-ink-soft);
}

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

.zr-hero-plate-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--zs-bg-elev);
}

.zr-hero-fig {
  margin: 0;
  width: 100%;
  max-width: 340px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-card);
}

.zr-hero-fig img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 410px;
  object-fit: cover;
  object-position: center 14%;
  display: block;
}

.zr-hero-fig figcaption {
  padding: 12px 15px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--zs-surface-2);
  border-top: 1px solid var(--zs-rule);
}

.zr-fig-title {
  font-size: 0.84rem;
  font-weight: 640;
  color: var(--zs-ink);
}

.zr-fig-meta {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  color: var(--zs-ink-soft);
}

/* ==========================================================================
   3-COLUMN CONVERSATIONAL RESEARCH WORKSPACE
   ========================================================================== */
.zr-workspace-sec {
  padding: 64px 0 76px;
}

.zr-workspace-head {
  margin-bottom: 28px;
}

.zr-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr) minmax(260px, 300px);
  gap: 20px;
  align-items: start;
}

.zr-sidebar,
.zr-canvas,
.zr-telemetry {
  min-width: 0;
}

.zr-sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.zr-side-block,
.zr-tele-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-card), var(--zs-specular);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zr-side-heading {
  margin: 0;
  font-family: var(--zs-mono);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--zs-ink-soft);
}

/* Capability Lens Filter Tabs */
.zr-cap-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zr-cap-btn {
  min-height: 36px;
  padding: 6px 11px;
  border-radius: 7px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface-2);
  color: var(--zs-ink-soft);
  font-family: var(--zs-sans);
  font-size: 0.79rem;
  font-weight: 560;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.zr-cap-btn:hover {
  border-color: var(--zs-rule-strong);
  color: var(--zs-ink);
}

.zr-cap-btn.is-active {
  background: rgba(225, 29, 72, 0.12);
  border-color: var(--zs-accent);
  color: var(--zs-ink);
}

body[data-theme="vellum"] .zr-cap-btn.is-active {
  background: rgba(190, 18, 60, 0.08);
}

/* Active Capability Inspector Card */
.zr-cap-card {
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.zr-cap-card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.zr-cap-card-copy {
  margin: 0;
  max-width: 60ch;
  font-size: 0.82rem;
  line-height: 1.52;
  color: var(--zs-ink-soft);
}

.zr-cap-contract {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--zs-teal-text);
  padding-top: 6px;
  border-top: 1px solid var(--zs-rule);
}

/* Curated Thread List */
.zr-thread-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zr-thread-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: transparent;
  color: var(--zs-ink-soft);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.zr-thread-btn:hover {
  background: var(--zs-surface-2);
  border-color: var(--zs-rule-strong);
}

.zr-thread-btn.is-active {
  background: var(--zs-surface-2);
  border-color: var(--zs-rule-strong);
  box-shadow: inset 3px 0 0 var(--zs-accent);
}

.zr-thread-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
  font-family: var(--zs-mono);
  font-size: 0.69rem;
  font-weight: 600;
  color: var(--zs-accent-soft);
}

.zr-thread-title {
  font-size: 0.86rem;
  font-weight: 630;
  line-height: 1.32;
  color: var(--zs-ink);
}

.zr-thread-sub {
  font-size: 0.77rem;
  line-height: 1.42;
  color: var(--zs-ink-soft);
}

/* ==========================================================================
   CENTER CONVERSATION CANVAS
   ========================================================================== */
.zr-canvas {
  border-radius: 14px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-window), var(--zs-specular);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.zr-canvas-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.zr-canvas-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.zr-canvas-title-wrap h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.zr-canvas-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.zr-mode-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.1);
  color: var(--zs-teal-text);
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  font-weight: 600;
}

body[data-theme="vellum"] .zr-mode-pill {
  background: rgba(15, 118, 110, 0.09);
  border-color: rgba(15, 118, 110, 0.30);
  color: #115E59;
}

/* Transcript Area */
.zr-transcript {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 680px;
  overflow-y: auto;
  background: var(--zs-bg);
}

.zr-turn {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
}

.zr-turn-researcher {
  border-left: 3px solid var(--zs-teal);
  background: var(--zs-bg-elev);
}

.zr-turn-zoe {
  border-left: 3px solid var(--zs-accent);
}

.zr-turn-refusal {
  border-color: rgba(225, 29, 72, 0.42);
  background: rgba(225, 29, 72, 0.05);
  color: var(--zs-ink);
}

body[data-theme="vellum"] .zr-turn-refusal {
  background: rgba(190, 18, 60, 0.055);
  border-color: rgba(190, 18, 60, 0.35);
  color: #09090B;
}

body[data-theme="vellum"] .zr-turn-refusal .zs-regime-badge {
  background: rgba(190, 18, 60, 0.11);
  border-color: rgba(190, 18, 60, 0.35);
  color: #9F1239;
}

.zr-turn-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zr-turn-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.zr-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--zs-rule-strong);
  flex-shrink: 0;
}

.zr-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(20, 184, 166, 0.35);
  color: var(--zs-teal-text);
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}

body[data-theme="vellum"] .zr-role-badge {
  background: rgba(15, 118, 110, 0.09);
  border-color: rgba(15, 118, 110, 0.30);
  color: #115E59;
}

.zr-author-name {
  font-size: 0.87rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.zr-author-role {
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  color: var(--zs-ink-soft);
}

.zr-turn-text {
  margin: 0;
  max-width: 66ch;
  font-size: 0.93rem;
  line-height: 1.62;
  color: var(--zs-ink);
}

.zr-subblocks {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.zr-subblock {
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zr-subblock-label {
  font-family: var(--zs-mono);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zs-teal-text);
}

.zr-subblock-zoe {
  color: var(--zs-accent-soft);
}

.zr-subblock-body {
  margin: 0;
  max-width: 64ch;
  font-size: 0.85rem;
  line-height: 1.56;
  color: var(--zs-ink-soft);
}

.zr-code-well {
  --zs-ink: #F4F4F5;
  --zs-ink-soft: #D4D4D8;
  --surface-strong: rgba(255, 255, 255, 0.12);
  --zs-rule: rgba(255, 255, 255, 0.14);
  margin: 2px 0 0;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #070709;
  color: #F4F4F5;
  font-family: var(--zs-mono);
  font-size: 0.77rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Follow-up Chips */
.zr-followup-wrap {
  padding: 14px 20px 10px;
  border-top: 1px solid var(--zs-rule);
  background: var(--zs-surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zr-followup-label {
  font-family: var(--zs-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zs-ink-soft);
}

.zr-followup-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zr-followup-chip {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface-2);
  color: var(--zs-ink);
  font-family: var(--zs-sans);
  font-size: 0.8rem;
  font-weight: 540;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.zr-followup-chip:hover:not(:disabled) {
  border-color: var(--zs-accent);
  background: rgba(225, 29, 72, 0.1);
}

.zr-followup-chip:disabled,
.zr-followup-chip.is-used {
  opacity: 0.78;
  border-color: var(--zs-rule);
  background: var(--zs-bg-elev);
  color: var(--zs-ink-soft);
  cursor: default;
}

/* Live Offline Composer */
.zr-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px 8px;
  background: var(--zs-surface);
}

.zr-chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-bg);
  color: var(--zs-ink);
  font-family: var(--zs-sans);
  font-size: 0.9rem;
}

.zr-chat-input::placeholder {
  color: var(--zs-ink-soft);
  opacity: 1;
}

.zr-composer-note {
  margin: 0;
  max-width: 64ch;
  padding: 0 20px 16px;
  font-size: 0.77rem;
  line-height: 1.5;
  color: var(--zs-ink-soft);
  background: var(--zs-surface);
}

/* ==========================================================================
   RIGHT TELEMETRY RAIL
   ========================================================================== */
.zr-telemetry {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.zr-tele-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.zr-tele-eq,
.zr-firewall-eq {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
}

.zr-tele-copy {
  margin: 0;
  max-width: 60ch;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--zs-ink-soft);
}

.zr-tele-copy strong {
  color: var(--zs-ink);
}

.zr-slider-box {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.zr-slider-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.83rem;
}

.zr-strict-label {
  font-weight: 560;
  color: var(--zs-ink);
}

.zr-strict-val {
  font-family: var(--zs-mono);
  font-size: 0.76rem;
  color: var(--zs-accent-soft);
  text-align: right;
}

.zr-strict-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.zr-strict-btn {
  width: 100%;
  justify-content: center;
  padding: 6px 8px;
  text-align: center;
  background: var(--zs-surface);
  border-color: var(--zs-rule-strong);
  color: var(--zs-ink-soft);
}

.zr-strict-btn:hover {
  color: var(--zs-ink);
  border-color: var(--zs-ink-soft);
}

.zr-strict-btn.is-active {
  background: rgba(225, 29, 72, 0.16);
  border-color: var(--zs-accent);
  color: var(--zs-ink);
  font-weight: 660;
}

body[data-theme="vellum"] .zr-strict-btn {
  background: #FFFFFF;
  border-color: rgba(9, 9, 11, 0.18);
  color: #3F3F46;
}

body[data-theme="vellum"] .zr-strict-btn:hover {
  color: #09090B;
  border-color: rgba(9, 9, 11, 0.36);
}

body[data-theme="vellum"] .zr-strict-btn.is-active {
  background: rgba(190, 18, 60, 0.10);
  border-color: #BE123C;
  color: #09090B;
  font-weight: 660;
}

.zr-slider-hint {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.52;
  color: var(--zs-ink-soft);
}

.zr-candidates {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.zr-cand-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.zr-cand-row.is-surviving {
  border-color: rgba(52, 211, 153, 0.35);
}

.zr-cand-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.79rem;
}

.zr-cand-label {
  font-weight: 560;
  color: var(--zs-ink);
}

.zr-cand-prob {
  font-family: var(--zs-mono);
  font-size: 0.73rem;
  color: var(--zs-ink-soft);
  flex-shrink: 0;
}

.zr-cand-progress {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--zs-surface-2);
  accent-color: var(--zs-emerald);
}

.zr-cand-row:not(.is-surviving) .zr-cand-progress {
  accent-color: var(--zs-ink-muted);
}

.zr-cand-status {
  font-family: var(--zs-mono);
  font-size: 0.69rem;
  color: var(--zs-ink-soft);
}

.zr-cand-row.is-surviving .zr-cand-status {
  color: var(--zs-emerald-text);
}

.zr-tele-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zr-tele-flags code {
  font-size: 0.72rem;
}

/* ==========================================================================
   ZOE STUDIO STORYBOARD PLAYGROUND & AESTHETICS EXTRACTOR
   ========================================================================== */
.zr-studio-sec {
  padding: 64px 0 72px;
}

.zr-studio-head {
  margin-bottom: 28px;
}

.zr-studio-lead {
  max-width: 64ch;
}

.zr-studio-stage {
  border-radius: 16px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  box-shadow: var(--zs-shadow-window), var(--zs-specular);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.zr-studio-stage[data-studio-mood="ruby-folio"] {
  border-color: rgba(225, 29, 72, 0.42);
  box-shadow: inset 0 3px 0 #E11D48, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(225, 29, 72, 0.08), transparent 70%),
    var(--zs-surface);
}

.zr-studio-stage[data-studio-mood="botanical-vellum"] {
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: inset 0 3px 0 #10B981, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(16, 185, 129, 0.08), transparent 70%),
    var(--zs-surface);
}

.zr-studio-stage[data-studio-mood="gem-teal"] {
  border-color: rgba(20, 184, 166, 0.44);
  box-shadow: inset 0 3px 0 #14B8A6, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(20, 184, 166, 0.08), transparent 70%),
    var(--zs-surface);
}

.zr-studio-stage[data-studio-mood="gold-atelier"] {
  border-color: rgba(245, 158, 11, 0.44);
  box-shadow: inset 0 3px 0 #F59E0B, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(245, 158, 11, 0.08), transparent 70%),
    var(--zs-surface);
}

.zr-studio-stage[data-studio-mood="extracted-card"] {
  border-color: rgba(244, 244, 245, 0.34);
  box-shadow: inset 0 3px 0 #FB7185, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(251, 113, 133, 0.08), transparent 70%),
    var(--zs-surface);
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="ruby-folio"] {
  border-color: rgba(190, 18, 60, 0.38);
  box-shadow: inset 0 3px 0 #BE123C, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(190, 18, 60, 0.045), transparent 70%),
    #FFFFFF;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="botanical-vellum"] {
  border-color: rgba(4, 120, 87, 0.38);
  box-shadow: inset 0 3px 0 #047857, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(4, 120, 87, 0.045), transparent 70%),
    #FFFFFF;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="gem-teal"] {
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: inset 0 3px 0 #0F766E, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(15, 118, 110, 0.045), transparent 70%),
    #FFFFFF;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="gold-atelier"] {
  border-color: rgba(180, 83, 9, 0.38);
  box-shadow: inset 0 3px 0 #B45309, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(180, 83, 9, 0.045), transparent 70%),
    #FFFFFF;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="extracted-card"] {
  border-color: rgba(9, 9, 11, 0.28);
  box-shadow: inset 0 3px 0 #9F1239, var(--zs-shadow-window);
  background:
    radial-gradient(ellipse 45% 32% at 10% 0%, rgba(159, 18, 57, 0.045), transparent 70%),
    #FFFFFF;
}

.zr-studio-stage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.zr-studio-stage-meta,
.zr-studio-stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.zr-mood-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 640;
  border: 1px solid rgba(251, 113, 133, 0.38);
  background: rgba(225, 29, 72, 0.16);
  color: #FDA4AF;
}

.zr-studio-stage[data-studio-mood="botanical-vellum"] .zr-mood-badge {
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(16, 185, 129, 0.14);
  color: #6EE7B7;
}

.zr-studio-stage[data-studio-mood="gem-teal"] .zr-mood-badge {
  border-color: rgba(45, 212, 191, 0.38);
  background: rgba(20, 184, 166, 0.14);
  color: #5EEAD4;
}

.zr-studio-stage[data-studio-mood="gold-atelier"] .zr-mood-badge {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(245, 158, 11, 0.14);
  color: #FCD34D;
}

.zr-studio-stage[data-studio-mood="extracted-card"] .zr-mood-badge {
  border-color: rgba(244, 244, 245, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #F4F4F5;
}

body[data-theme="vellum"] .zr-mood-badge {
  border-color: rgba(159, 18, 57, 0.32);
  background: rgba(190, 18, 60, 0.09);
  color: #9F1239;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="botanical-vellum"] .zr-mood-badge {
  border-color: rgba(4, 120, 87, 0.32);
  background: rgba(4, 120, 87, 0.09);
  color: #065F46;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="gem-teal"] .zr-mood-badge {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.09);
  color: #115E59;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="gold-atelier"] .zr-mood-badge {
  border-color: rgba(146, 64, 14, 0.32);
  background: rgba(180, 83, 9, 0.09);
  color: #92400E;
}

body[data-theme="vellum"] .zr-studio-stage[data-studio-mood="extracted-card"] .zr-mood-badge {
  border-color: rgba(9, 9, 11, 0.24);
  background: rgba(9, 9, 11, 0.06);
  color: #18181B;
}

.zr-privacy-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.1);
  color: var(--zs-teal-text);
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  font-weight: 600;
}

body[data-theme="vellum"] .zr-privacy-badge {
  border-color: rgba(15, 118, 110, 0.3);
  background: rgba(15, 118, 110, 0.09);
  color: #115E59;
}

.zr-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.92fr);
  align-items: stretch;
}

.zr-studio-panel {
  padding: 22px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.zr-storyboard-panel {
  border-right: 1px solid var(--zs-rule);
}

.zr-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--zs-rule);
}

.zr-panel-head h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 650;
  color: var(--zs-ink);
}

.zr-panel-tag {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  color: var(--zs-ink-soft);
}

.zr-control-group {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.zr-group-title {
  margin: 0;
  font-family: var(--zs-mono);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--zs-ink-soft);
}

.zr-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.zr-cap-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.zr-framing-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zr-framing-subrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zr-gem-readout {
  margin: 0;
  font-family: var(--zs-mono);
  font-size: 0.74rem;
  line-height: 1.52;
  color: var(--zs-teal-text);
}

body[data-theme="vellum"] .zr-gem-readout {
  color: #115E59;
}

.zr-canvas-frame-wrap,
.zr-extractor-preview-wrap {
  border-radius: 12px;
  border: 1px solid var(--zs-rule-strong);
  background: #070709;
  padding: 10px;
  overflow: hidden;
}

#zoeStoryboardCanvas,
#zoeExtractorCanvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.zr-timeline-head,
.zr-export-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.zr-timeline-controls,
.zr-export-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.zr-lock-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 560;
  color: var(--zs-ink-soft);
  cursor: pointer;
}

.zr-timeline-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.zr-shot-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px;
  border-radius: 10px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  color: var(--zs-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.zr-shot-card:hover {
  border-color: var(--zs-rule-strong);
}

.zr-shot-card.is-active {
  border-color: var(--zs-accent);
  background: var(--zs-surface-2);
}

.zr-shot-thumb {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--zs-rule);
}

.zr-shot-kicker {
  font-family: var(--zs-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--zs-accent-soft);
}

.zr-shot-title {
  font-size: 0.81rem;
  font-weight: 640;
  line-height: 1.3;
  color: var(--zs-ink);
}

.zr-shot-meta {
  font-size: 0.74rem;
  line-height: 1.38;
  color: var(--zs-ink-soft);
}

.zr-shot-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.zr-editor-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.zr-editor-wide {
  grid-column: 1 / -1;
}

.zr-editor-field label {
  font-family: var(--zs-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--zs-ink-soft);
}

.zr-studio-sec .zs-btn-primary,
.zr-workspace-sec .zs-btn-primary,
.zr-invariants-sec .zs-btn-primary,
.zr-studio-sec .zr-cap-btn,
.zr-studio-sec .zs-btn-quiet,
.zr-studio-input,
.zr-studio-select {
  min-height: 44px;
}

.zr-studio-input,
.zr-studio-select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  color: var(--zs-ink);
  font-family: var(--zs-sans);
  font-size: 0.85rem;
  line-height: 1.5;
  box-sizing: border-box;
}

.zr-card-pre {
  max-height: 220px;
  overflow-y: auto;
}

.zr-director-box {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-bg-elev);
}

.zr-director-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zr-director-score {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.38);
  background: rgba(16, 185, 129, 0.14);
  color: #6EE7B7;
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  font-weight: 650;
}

body[data-theme="vellum"] .zr-director-score {
  border-color: rgba(4, 120, 87, 0.34);
  background: rgba(4, 120, 87, 0.09);
  color: #065F46;
}

.zr-director-summary {
  margin: 0;
  max-width: 64ch;
  font-size: 0.83rem;
  line-height: 1.54;
  color: var(--zs-ink-soft);
}

.zr-director-stage-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.zr-stage-field-label {
  font-family: var(--zs-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--zs-ink-soft);
}

.zr-director-critique {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.zr-critique-card {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zr-critique-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zr-critique-title {
  font-size: 0.81rem;
  font-weight: 640;
  line-height: 1.5;
  color: var(--zs-ink);
}

.zr-critique-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--zs-mono);
  font-size: 0.69rem;
  font-weight: 650;
  text-transform: uppercase;
  border: 1px solid rgba(45, 212, 191, 0.38);
  background: rgba(20, 184, 166, 0.14);
  color: #5EEAD4;
}

.zr-critique-tag[data-tag="solvable"] {
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(16, 185, 129, 0.14);
  color: #6EE7B7;
}

.zr-critique-tag[data-tag="exploratory"] {
  border-color: rgba(251, 191, 36, 0.38);
  background: rgba(245, 158, 11, 0.14);
  color: #FCD34D;
}

body[data-theme="vellum"] .zr-critique-tag {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.09);
  color: #115E59;
}

body[data-theme="vellum"] .zr-critique-tag[data-tag="solvable"] {
  border-color: rgba(4, 120, 87, 0.32);
  background: rgba(4, 120, 87, 0.09);
  color: #065F46;
}

body[data-theme="vellum"] .zr-critique-tag[data-tag="exploratory"] {
  border-color: rgba(146, 64, 14, 0.32);
  background: rgba(180, 83, 9, 0.09);
  color: #92400E;
}

.zr-critique-line {
  margin: 0;
  max-width: 62ch;
  font-size: 0.77rem;
  line-height: 1.52;
  color: var(--zs-ink-soft);
}

.zr-critique-line strong {
  color: var(--zs-ink);
}

.zr-director-decision {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.zr-decision-title {
  margin: 0;
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  font-weight: 650;
  text-transform: uppercase;
  color: var(--zs-teal-text);
}

body[data-theme="vellum"] .zr-decision-title {
  color: #115E59;
}

.zr-decision-copy,
.zr-authority-note {
  margin: 0;
  max-width: 64ch;
  font-size: 0.78rem;
  line-height: 1.52;
  color: var(--zs-ink-soft);
}

.zr-budget-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
}

.zr-budget-stat {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--zs-ink);
}

.zr-budget-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--zs-mono);
  font-size: 0.69rem;
  font-weight: 650;
  border: 1px solid rgba(52, 211, 153, 0.38);
  background: rgba(16, 185, 129, 0.14);
  color: #6EE7B7;
}

.zr-budget-badge.is-warn {
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(245, 158, 11, 0.15);
  color: #FCD34D;
}

body[data-theme="vellum"] .zr-budget-badge {
  border-color: rgba(4, 120, 87, 0.32);
  background: rgba(4, 120, 87, 0.09);
  color: #065F46;
}

body[data-theme="vellum"] .zr-budget-badge.is-warn {
  border-color: rgba(146, 64, 14, 0.34);
  background: rgba(180, 83, 9, 0.09);
  color: #92400E;
}

.zr-authority-note strong {
  color: var(--zs-ink);
}

.zr-director-triage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.zr-triage-col {
  padding: 10px 11px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.zr-triage-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--zs-rule);
}

.zr-triage-kind {
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--zs-accent-soft);
}

body[data-theme="vellum"] .zr-triage-kind {
  color: #9F1239;
}

.zr-triage-meta {
  font-family: var(--zs-mono);
  font-size: 0.69rem;
  line-height: 1.45;
  color: var(--zs-teal-text);
}

body[data-theme="vellum"] .zr-triage-meta {
  color: #115E59;
}

.zr-triage-body {
  margin: 0;
  max-width: 60ch;
  font-size: 0.76rem;
  line-height: 1.52;
  color: var(--zs-ink-soft);
}

.zr-triage-owner {
  margin: 0;
  font-family: var(--zs-mono);
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--zs-ink);
}

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

.zr-director-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.zr-director-group-title {
  margin: 0;
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zs-accent-soft);
}

body[data-theme="vellum"] .zr-director-group-title {
  color: #9F1239;
}

.zr-law-card {
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.zr-law-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zr-law-name {
  font-size: 0.79rem;
  font-weight: 640;
  line-height: 1.5;
  color: var(--zs-ink);
}

.zr-law-pts {
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  font-weight: 650;
  color: var(--zs-teal-text);
  flex-shrink: 0;
}

body[data-theme="vellum"] .zr-law-pts {
  color: #115E59;
}

.zr-law-note {
  margin: 0;
  max-width: 60ch;
  font-size: 0.76rem;
  line-height: 1.52;
  color: var(--zs-ink-soft);
}

.zr-extractor-note {
  margin: 0;
  max-width: 62ch;
  font-size: 0.84rem;
  line-height: 1.56;
  color: var(--zs-ink-soft);
}

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

.zr-plate-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  color: var(--zs-ink);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.zr-plate-btn:hover {
  border-color: var(--zs-rule-strong);
}

.zr-plate-btn.is-active {
  border-color: var(--zs-accent);
  background: var(--zs-surface-2);
}

.zr-plate-thumb {
  width: 34px;
  height: 52px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--zs-rule-strong);
  flex-shrink: 0;
}

.zr-plate-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 52px;
  border-radius: 5px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  color: var(--zs-accent-soft);
  font-family: var(--zs-mono);
  font-size: 0.64rem;
  font-weight: 700;
  flex-shrink: 0;
}

.zr-plate-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zr-plate-meta strong {
  font-size: 0.8rem;
  font-weight: 630;
  line-height: 1.25;
  color: var(--zs-ink);
}

.zr-plate-meta span {
  font-size: 0.71rem;
  line-height: 1.3;
  color: var(--zs-ink-soft);
}

.zr-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px dashed var(--zs-rule-strong);
  background: var(--zs-bg-elev);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.zr-dropzone:hover,
.zr-dropzone.is-dragover {
  border-color: var(--zs-accent);
  background: var(--zs-surface-2);
}

.zr-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.zr-dropzone-title {
  font-size: 0.82rem;
  font-weight: 620;
  color: var(--zs-ink);
}

.zr-dropzone-sub {
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  color: var(--zs-ink-soft);
}

.zr-extractor-status {
  margin: 0;
  max-width: 62ch;
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  line-height: 1.52;
  color: var(--zs-teal-text);
}

body[data-theme="vellum"] .zr-extractor-status {
  color: #115E59;
}

.zr-swatch-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.zr-swatch-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
}

.zr-swatch-canvas {
  width: 38px;
  height: 38px;
  border-radius: 7px;
  border: 1px solid var(--zs-rule-strong);
  display: block;
}

.zr-swatch-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.zr-swatch-role {
  font-size: 0.8rem;
  font-weight: 630;
  color: var(--zs-ink);
}

.zr-swatch-hex {
  font-family: var(--zs-mono);
  font-size: 0.72rem;
  color: var(--zs-ink-soft);
}

.zr-swatch-wcag {
  font-family: var(--zs-mono);
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--zs-emerald-text);
  text-align: right;
}

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

.zr-metric-tile {
  padding: 9px 11px;
  border-radius: 9px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-bg-elev);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.zr-metric-label {
  font-family: var(--zs-mono);
  font-size: 0.69rem;
  color: var(--zs-ink-soft);
}

.zr-metric-val {
  font-size: 0.83rem;
  font-weight: 640;
  color: var(--zs-ink);
}

.zr-apply-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ==========================================================================
   FEATURED VERIFIED INTERACTIVE LABS (#zoeInteractiveLabs)
   ========================================================================== */
.zr-labs-sec {
  padding: 64px 0;
}

.zr-labs-head h2 {
  font-family: var(--font-serif, "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif);
}

.zr-labs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.zr-lab-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
}

.zr-lab-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.zr-lab-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--zs-mono);
  font-size: 0.68rem;
  font-weight: 650;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.12);
  color: var(--zs-teal-text);
}

body[data-theme="vellum"] .zr-lab-badge {
  border-color: rgba(15, 118, 110, 0.32);
  background: rgba(15, 118, 110, 0.08);
  color: #115E59;
}

.zr-lab-parity {
  font-family: var(--zs-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--zs-ink-soft);
}

.zr-lab-copy {
  margin: 0;
  max-width: 64ch;
  font-size: 0.89rem;
  line-height: 1.6;
  color: var(--zs-ink-soft);
}

.zr-lab-foot {
  margin-top: auto;
  padding-top: 6px;
}

.zr-lab-foot .zs-btn,
.zr-labs-actions .zs-btn {
  min-height: 44px;
}

.zr-labs-actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ==========================================================================
   VISIBLE CONSTITUTIONAL INVARIANTS STRIP
   ========================================================================== */
.zr-invariants-sec {
  padding: 56px 0;
}

.zr-inv-panel {
  padding: 26px;
  border-radius: 14px;
  border: 1px solid var(--zs-rule);
  background: var(--zs-surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.zr-inv-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zr-inv-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.3vw, 1.75rem);
  font-weight: 660;
  color: var(--zs-ink);
}

.zr-inv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (1160px / 900px / 640px)
   ========================================================================== */
@media (max-width: 1160px) {
  .zr-workspace {
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  }
  .zr-telemetry {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .zr-studio-grid {
    grid-template-columns: 1fr;
  }
  .zr-labs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .zr-storyboard-panel {
    border-right: 0;
    border-bottom: 1px solid var(--zs-rule);
  }
}

@media (max-width: 900px) {
  .zr-hero-card {
    grid-template-columns: 1fr;
  }
  .zr-folio-page {
    padding: 22px;
  }
  .zr-folio-spine {
    border-left: 0;
    border-right: 0;
    border-top: 1px solid var(--zs-rule);
    border-bottom: 1px solid var(--zs-rule);
    padding: 10px 18px;
    box-shadow: none;
  }
  .zr-spine-label {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .zr-hero-fig {
    max-width: 280px;
  }
  .zr-hero-fig img {
    max-height: 320px;
  }
  .zr-workspace {
    grid-template-columns: 1fr;
  }
  .zr-telemetry {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .zr-hero {
    padding: 24px 0 36px;
  }
  .zr-folio-page,
  .zr-side-block,
  .zr-tele-card,
  .zr-inv-panel {
    padding: 16px;
  }
  .zr-workspace-sec {
    padding: 44px 0 56px;
  }
  .zr-canvas-top,
  .zr-transcript,
  .zr-followup-wrap,
  .zr-composer {
    padding-left: 14px;
    padding-right: 14px;
  }
  .zr-composer-note {
    padding: 0 14px 14px;
  }
  .zr-composer {
    flex-direction: column;
    align-items: stretch;
  }
  .zr-transcript {
    max-height: none;
  }
  .zr-studio-sec {
    padding: 44px 0 54px;
  }
  .zr-studio-stage-bar,
  .zr-studio-panel {
    padding: 15px;
  }
  .zr-timeline-strip,
  .zr-shot-editor,
  .zr-plate-grid,
  .zr-metrics-grid,
  .zr-director-laws,
  .zr-director-stage-bar,
  .zr-director-triage,
  .zr-labs-grid {
    grid-template-columns: 1fr;
  }
}
