/* Zoe Swellmark GAM-1 Biomechanics Autonomy Monitor
 * Fine-Press Zero-CDN Architectural Stylesheet
 * Dual Themes: Nocturnal Obsidian (default) + Daylight Vellum
 * Zero inline styles, >= 44px controls, 45-75ch measure, 1.60 line-height
 * Scoped under .gb-shell / body.gb-body so #nuclideSplitBar, .zs-licensing-band, and .zs-footer remain unmutated.
 */

:root,
body.gb-body[data-theme="nocturnal"] {
  --paper: #0B1120;
  --band: #131C31;
  --gb-surface: #111827;
  --gb-ink: #F1F5F9;
  --ink2: #CBD5E1;
  --mute: #94A3B8;
  --hair: #334155;
  --hair-soft: #1E293B;
  --gb-accent: #38BDF8;
  --accent-mid: #7DD3FC;
  --accent-soft: #0B3B59;
  --accent-2: #FBBF24;
  --accent-2-mid: #FCD34D;
  --accent-2-soft: #451A03;
  --good: #34D399;
  --bad: #F87171;
  --focus-ring: #38BDF8;
}

body.gb-body[data-theme="vellum"] {
  --paper: #FAF8F4;
  --band: #EFECE4;
  --gb-surface: #FFFFFF;
  --gb-ink: #111827;
  --ink2: #1F2937;
  --mute: #4B5563;
  --hair: #CBD5E1;
  --hair-soft: #E2E8F0;
  --gb-accent: #075985;
  --accent-mid: #0369A1;
  --accent-soft: #E0F2FE;
  --accent-2: #92400E;
  --accent-2-mid: #B45309;
  --accent-2-soft: #FEF3C7;
  --good: #065F46;
  --bad: #991B1B;
  --focus-ring: #075985;
}

.gb-shell *,
.gb-shell *::before,
.gb-shell *::after {
  box-sizing: border-box;
}

.gb-shell main > :not(.zs-licensing-band) *,
.gb-shell .const-banner * {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body.gb-body {
  background-color: var(--paper);
  color: var(--gb-ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.60;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

body.gb-body.ns-split-ready {
  padding-top: 56px;
}

.gb-shell {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 28px 64px;
}

.gb-shell main {
  min-width: 0;
}

/* Commercial IP Lock Banner (Site Design System Tokens) */
.zs-licensing-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 18px 22px;
  margin-bottom: 24px;
  border-radius: 12px;
  border: 1px solid var(--zs-rule-strong);
  background: var(--zs-surface);
  color: var(--zs-ink);
}

.zs-licensing-copy-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.zs-licensing-copy {
  margin: 0;
  max-width: 68ch;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--zs-ink-soft);
}

.zs-licensing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.gb-shell h1,
.gb-shell h2,
.gb-shell h3,
.gb-shell h4 {
  color: var(--gb-ink);
  letter-spacing: -0.02em;
  text-wrap: pretty;
}

.gb-shell h1 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 700;
  line-height: 1.1;
}

.gb-shell h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 12px;
}

.gb-shell h3 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 8px;
}

.gb-shell main > :not(.zs-licensing-band) p {
  color: var(--ink2);
  margin-bottom: 14px;
  line-height: 1.6;
  max-width: 66ch;
}

.gb-shell main > :not(.zs-licensing-band) p:last-child {
  margin-bottom: 0;
}

.gb-shell .measure {
  max-width: 66ch;
  line-height: 1.6;
}

.gb-shell .mono {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.gb-shell .overline {
  text-decoration: overline;
}

/* Constitutional Banner */
.gb-shell .const-banner {
  border-top: 2px solid var(--gb-ink);
  border-bottom: 1px solid var(--hair);
  padding: 12px 0;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}

.gb-shell .const-disclaimer {
  font-size: 0.875rem;
  color: var(--ink2);
  max-width: 66ch;
  line-height: 1.6;
}

.gb-shell .const-kicker {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-right: 8px;
}

.gb-shell .top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Interactive Controls (>= 44x44px hit targets, 0px architectural radius) */
.gb-shell .btn,
.gb-shell .ctrl-select {
  min-height: 44px;
  min-width: 44px;
  max-width: 100%;
  padding: 8px 16px;
  border-radius: 0;
  border: 1px solid var(--gb-ink);
  background-color: var(--paper);
  color: var(--gb-ink);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.gb-shell .btn:hover,
.gb-shell .ctrl-select:hover {
  background-color: var(--band);
}

.gb-shell .btn:focus-visible,
.gb-shell .ctrl-select:focus-visible,
.gb-shell .tau-range:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.gb-shell .btn-accent {
  background-color: var(--gb-accent);
  border-color: var(--gb-accent);
  color: var(--paper);
}

.gb-shell .btn-accent:hover {
  background-color: var(--accent-mid);
  border-color: var(--accent-mid);
  color: var(--paper);
}

.gb-shell .btn-seg {
  border-color: var(--hair);
  color: var(--ink2);
  background-color: var(--paper);
}

.gb-shell .btn-seg.is-active {
  background-color: var(--gb-accent);
  border-color: var(--gb-accent);
  color: var(--paper);
}

/* 12-Column Editorial Grid */
.gb-shell .grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.gb-shell .sec {
  margin-top: 56px;
  padding-top: 38px;
  border-top: 1px solid var(--hair);
  min-width: 0;
}

/* Answer-First Split Hero */
.gb-shell .hero-head {
  align-items: end;
}

.gb-shell .hero-main {
  grid-column: 1 / 9;
  min-width: 0;
}

.gb-shell .eyebrow {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gb-accent);
  margin-bottom: 10px;
}

.gb-shell .deck {
  margin-top: 16px;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--ink2);
  max-width: 64ch;
}

.gb-shell .hero-stat {
  grid-column: 9 / 13;
  border-left: 1px solid var(--hair);
  padding-left: 24px;
  min-width: 0;
}

.gb-shell .big-num {
  font-size: clamp(2.6rem, 4.4vw, 3.8rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.03em;
  color: var(--gb-accent);
  white-space: nowrap;
}

.gb-shell .big-num-caption {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--mute);
  max-width: 52ch;
}

/* Contained Full-Width Equation Band */
.gb-shell .full-band {
  margin-top: 40px;
  margin-inline: 0;
  padding: 32px 24px;
  background-color: var(--band);
  border: 1px solid var(--hair);
  min-width: 0;
}

.gb-shell .split-left {
  grid-column: 1 / 5;
  min-width: 0;
}

.gb-shell .split-right {
  grid-column: 5 / 13;
  min-width: 0;
}

.gb-shell .eq-display {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: var(--gb-ink);
  overflow-x: auto;
  max-width: 100%;
}

.gb-shell .eq-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 36px;
  align-items: baseline;
}

.gb-shell .eq-term var {
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
}

/* 3-Column Strip */
.gb-shell .cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.gb-shell .cols-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 22px;
}

.gb-shell .col-item {
  border-top: 1px solid var(--hair);
  padding-top: 14px;
  min-width: 0;
}

/* Filter Toolbar */
.gb-shell .toolbar {
  margin-top: 36px;
  padding: 18px 0;
  border-top: 2px solid var(--gb-ink);
  border-bottom: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 28px;
}

.gb-shell .filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}

.gb-shell .filter-label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}

.gb-shell .seg-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* KPI Strip */
.gb-shell .kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.gb-shell .kpi-cell {
  border-top: 1px solid var(--hair);
  padding-top: 12px;
  min-width: 0;
}

.gb-shell .kpi-label {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gb-shell .kpi-val {
  margin-top: 4px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--gb-ink);
  overflow-wrap: anywhere;
}

.gb-shell .kpi-sub {
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--mute);
  overflow-wrap: anywhere;
}

/* Figures & Interactive Threshold Controls */
.gb-shell figure {
  margin-top: 24px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.gb-shell .fig-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gb-ink);
  margin-bottom: 10px;
}

.gb-shell figcaption {
  margin-top: 10px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--mute);
  max-width: 72ch;
}

.gb-shell .tau-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-bottom: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hair-soft);
}

.gb-shell .tau-range-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
}

.gb-shell .tau-range {
  width: 190px;
  max-width: 100%;
  min-height: 44px;
  accent-color: var(--gb-accent);
  cursor: pointer;
}

.gb-shell .tau-readout {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  color: var(--gb-ink);
  padding: 6px 10px;
  background-color: var(--band);
  border-left: 3px solid var(--gb-accent);
  max-width: 100%;
  overflow-wrap: anywhere;
}

/* Pure SVG Chart Classes (Zero Inline Styles) */
.gb-shell svg.data-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  overflow: hidden;
}

.gb-shell .svg-axis {
  stroke: var(--hair);
  stroke-width: 1.3;
  fill: none;
}

.gb-shell .svg-grid {
  stroke: var(--hair-soft);
  stroke-width: 1;
  fill: none;
}

.gb-shell .svg-tick {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  fill: var(--mute);
}

.gb-shell .svg-axis-label {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12.5px;
  fill: var(--mute);
}

.gb-shell .svg-legend {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  fill: var(--gb-ink);
}

.gb-shell .svg-label-v4 {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  fill: var(--accent-2);
}

.gb-shell .svg-label-v5 {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  fill: var(--gb-accent);
}

.gb-shell .svg-label-muted {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11.5px;
  fill: var(--mute);
}

.gb-shell .svg-line-t50 {
  fill: none;
  stroke: var(--gb-accent);
  stroke-width: 2.6;
}

.gb-shell .svg-line-t70 {
  fill: none;
  stroke: var(--good);
  stroke-width: 2.6;
}

.gb-shell .svg-line-t85 {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 2.6;
  stroke-dasharray: 6 4;
}

.gb-shell .svg-dot-t50 {
  fill: var(--gb-accent);
  stroke: var(--paper);
  stroke-width: 1.5;
}

.gb-shell .svg-dot-t70 {
  fill: var(--good);
  stroke: var(--paper);
  stroke-width: 1.5;
}

.gb-shell .svg-dot-t85 {
  fill: var(--accent-2);
  stroke: var(--paper);
  stroke-width: 1.5;
}

.gb-shell .svg-step-v4 {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 2.8;
}

.gb-shell .svg-step-v5 {
  fill: none;
  stroke: var(--gb-accent);
  stroke-width: 3.1;
}

.gb-shell .svg-phi-area {
  fill: var(--accent-soft);
  fill-opacity: 0.55;
  stroke: none;
}

.gb-shell .svg-phi-line {
  fill: none;
  stroke: var(--accent-mid);
  stroke-width: 1.6;
  stroke-dasharray: 5 4;
}

.gb-shell .svg-ref-line {
  stroke: var(--mute);
  stroke-width: 1.2;
  stroke-dasharray: 4 4;
}

.gb-shell .svg-cursor-line {
  stroke: var(--gb-ink);
  stroke-width: 1.6;
  stroke-dasharray: 3 3;
}

.gb-shell .svg-box-whisker {
  stroke: var(--ink2);
  stroke-width: 1.6;
}

.gb-shell .svg-box-v4 {
  fill: var(--accent-2-soft);
  stroke: var(--accent-2);
  stroke-width: 2;
}

.gb-shell .svg-box-v5 {
  fill: var(--accent-soft);
  stroke: var(--gb-accent);
  stroke-width: 2;
}

.gb-shell .svg-median-line {
  stroke: var(--gb-ink);
  stroke-width: 2.4;
}

.gb-shell .svg-mean-diamond {
  fill: var(--gb-ink);
  stroke: var(--paper);
  stroke-width: 1.2;
}

.gb-shell .svg-bar-v4 {
  fill: var(--accent-2);
}

.gb-shell .svg-bar-v5 {
  fill: var(--gb-accent);
}

.gb-shell .svg-radar-grid {
  fill: none;
  stroke: var(--hair);
  stroke-width: 1;
}

.gb-shell .svg-radar-axis {
  stroke: var(--hair);
  stroke-width: 1.1;
}

.gb-shell .svg-radar-v4 {
  fill: var(--accent-2);
  fill-opacity: 0.16;
  stroke: var(--accent-2);
  stroke-width: 2.4;
}

.gb-shell .svg-radar-v5 {
  fill: var(--gb-accent);
  fill-opacity: 0.20;
  stroke: var(--gb-accent);
  stroke-width: 2.8;
}

.gb-shell .svg-bottleneck-ring {
  fill: none;
  stroke: var(--bad);
  stroke-width: 2.2;
  stroke-dasharray: 4 2;
}

.gb-shell .svg-hit-zone {
  fill: transparent;
  cursor: pointer;
}

/* Open Editorial Tables (0 zebra stripes, 0 outer box) */
.gb-shell .table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  margin-top: 16px;
}

.gb-shell table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.94rem;
}

.gb-shell th {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--mute);
  padding: 10px 14px 10px 0;
  border-bottom: 2px solid var(--gb-ink);
  white-space: nowrap;
}

.gb-shell td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--hair);
  color: var(--ink2);
  vertical-align: top;
}

.gb-shell td:last-child,
.gb-shell th:last-child {
  padding-right: 0;
}

.gb-shell .num {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  white-space: nowrap;
  text-align: right;
  color: var(--gb-ink);
}

.gb-shell th.num {
  color: var(--mute);
}

.gb-shell .accent-strong {
  color: var(--gb-accent);
  font-weight: 700;
}

.gb-shell .amber-strong {
  color: var(--accent-2);
  font-weight: 700;
}

.gb-shell .delta-pos {
  color: var(--good);
  font-weight: 700;
}

.gb-shell .delta-neg {
  color: var(--bad);
  font-weight: 700;
}

/* Bottleneck Callout Strip */
.gb-shell .callout-strip {
  margin-top: 16px;
  padding: 14px 18px;
  background-color: var(--band);
  border-left: 4px solid var(--accent-2);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--gb-ink);
  overflow-wrap: anywhere;
}

/* Constitutional Flag Grid */
.gb-shell .flag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--ink2);
}

.gb-shell .flag-chip {
  padding: 4px 10px;
  background-color: var(--band);
  border: 1px solid var(--hair);
}

/* Printable One-Page Report Card */
.gb-shell .print-report {
  margin-top: 56px;
  padding: 32px;
  border: 2px solid var(--gb-ink);
  background-color: var(--gb-surface);
  min-width: 0;
}

.gb-shell .print-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gb-ink);
  margin-bottom: 18px;
}

.gb-shell .print-meta {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--mute);
}

.gb-shell .print-disclaimer {
  padding: 10px 14px;
  background-color: var(--band);
  border-left: 4px solid var(--accent-2);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--gb-ink);
  margin-bottom: 18px;
}

/* Offline Cartridge Browser & File Inspector */
.gb-shell .cartridge-controls {
  margin-top: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px 28px;
}

.gb-shell .verify-badge {
  min-height: 44px;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid var(--hair);
  background-color: var(--band);
}

.gb-shell .badge-verified {
  border-color: var(--good);
  color: var(--good);
}

.gb-shell .badge-unverified {
  border-color: var(--bad);
  color: var(--bad);
}

.gb-shell .sr-only-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gb-shell .file-btn {
  min-height: 44px;
  min-width: 44px;
}

.gb-shell .is-hidden {
  display: none;
}

/* Three-Face Switcher */
.gb-shell .face-switcher {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px 20px;
  padding: 14px 18px;
  margin-bottom: 24px;
  background-color: var(--band);
  border: 1.5px solid var(--gb-ink);
}

.gb-shell .face-switcher-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.gb-shell .face-switcher-note {
  font-size: 0.9rem;
  color: var(--ink2);
}

.gb-shell .face-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px 24px;
  margin-bottom: 22px;
}

.gb-shell .gemz-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  min-width: 0;
  max-width: 100%;
}

/* Forms & Phase Calibration Cards */
.gb-shell .forms-link-row {
  margin-top: 16px;
}

.gb-shell .phase-card-ui {
  padding: 16px;
  border: 1.5px solid var(--hair);
  background-color: var(--band);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.gb-shell .phase-weights-box {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--gb-ink);
  background-color: var(--gb-surface);
  border: 1px solid var(--hair);
  padding: 8px 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Safety Alert Pills */
.gb-shell .status-pill {
  display: inline-block;
  padding: 3px 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--hair);
}

.gb-shell .status-nominal {
  background-color: var(--accent-soft);
  border-color: var(--good);
  color: var(--good);
}

.gb-shell .status-advisory {
  background-color: var(--accent-2-soft);
  border-color: var(--bad);
  color: var(--bad);
}

/* Face 2: GEMZ VDI/AES Tiled Desk */
.gb-shell .gemz-desk-frame {
  --gemz-desk-bg: #1B5E63;
  --gemz-bar-bg: #F4F1EA;
  --gemz-bar-ink: #111827;
  --gemz-win-bg: #FAF8F4;
  --gemz-win-border: #1E293B;
  --gemz-title-bg: #1D4ED8;
  --gemz-title-ink: #FFFFFF;
  --gemz-sub-bg: #E2E8F0;
  --gemz-sub-ink: #1E293B;
  --gemz-body-ink: #111827;
  --gemz-plot-line: #0369A1;
  --gemz-plot-fill: #E0F2FE;
  --gemz-marker: #B45309;
  border: 2px solid var(--gemz-win-border);
  background-color: var(--gemz-desk-bg);
  min-width: 0;
  max-width: 100%;
}

.gb-shell .gemz-desk-frame[data-gemz-theme="viewmax_sm124"] {
  --gemz-desk-bg: #D4D4D4;
  --gemz-bar-bg: #FFFFFF;
  --gemz-bar-ink: #000000;
  --gemz-win-bg: #FFFFFF;
  --gemz-win-border: #000000;
  --gemz-title-bg: #000000;
  --gemz-title-ink: #FFFFFF;
  --gemz-sub-bg: #E5E5E5;
  --gemz-sub-ink: #000000;
  --gemz-body-ink: #000000;
  --gemz-plot-line: #000000;
  --gemz-plot-fill: #E5E5E5;
  --gemz-marker: #000000;
}

.gb-shell .gemz-menubar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 8px 14px;
  background-color: var(--gemz-bar-bg);
  color: var(--gemz-bar-ink);
  border-bottom: 2px solid var(--gemz-win-border);
  font-weight: 700;
  font-size: 0.88rem;
}

.gb-shell .gemz-research-badge {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 2px 8px;
  background-color: #FEF3C7;
  color: #78350F;
  border: 1px solid var(--gemz-win-border);
}

.gb-shell .gemz-desk-frame[data-gemz-theme="viewmax_sm124"] .gemz-research-badge {
  background-color: #000000;
  color: #FFFFFF;
}

.gb-shell .gemz-aes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
}

.gb-shell .gemz-window {
  background-color: var(--gemz-win-bg);
  color: var(--gemz-body-ink);
  border: 2px solid var(--gemz-win-border);
  box-shadow: 4px 4px 0 var(--gemz-win-border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gb-shell .gemz-win-title {
  background-color: var(--gemz-title-bg);
  color: var(--gemz-title-ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 10px;
  border-bottom: 1.5px solid var(--gemz-win-border);
}

.gb-shell .gemz-win-sub {
  background-color: var(--gemz-sub-bg);
  color: var(--gemz-sub-ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.76rem;
  padding: 4px 10px;
  border-bottom: 1px solid var(--gemz-win-border);
  overflow-wrap: anywhere;
}

.gb-shell .gemz-win-body {
  padding: 10px 12px;
  color: var(--gemz-body-ink);
  min-width: 0;
}

.gb-shell .gemz-pre {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--gemz-body-ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.gb-shell .gemz-vdi-caption {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--gemz-body-ink);
}

.gb-shell .gemz-alert-pill {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 10px;
  margin-bottom: 8px;
  border: 1px solid var(--gemz-win-border);
  background-color: #ECFDF5;
  color: #065F46;
}

.gb-shell .gemz-alert-pill.is-alert {
  background-color: #FEF2F2;
  color: #991B1B;
}

.gb-shell .gemz-desk-frame[data-gemz-theme="viewmax_sm124"] .gemz-alert-pill,
.gb-shell .gemz-desk-frame[data-gemz-theme="viewmax_sm124"] .gemz-alert-pill.is-alert {
  background-color: #E5E5E5;
  color: #000000;
}

.gb-shell .gemz-statusbar {
  background-color: var(--gemz-bar-bg);
  color: var(--gemz-bar-ink);
  border-top: 2px solid var(--gemz-win-border);
  padding: 6px 14px;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.gb-shell .gemz-svg-grid {
  stroke: #94A3B8;
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.gb-shell .gemz-svg-axis {
  stroke: var(--gemz-win-border);
  stroke-width: 1.2;
  fill: none;
}

.gb-shell .gemz-svg-area {
  fill: var(--gemz-plot-fill);
  fill-opacity: 0.7;
}

.gb-shell .gemz-svg-line {
  fill: none;
  stroke: var(--gemz-plot-line);
  stroke-width: 2.5;
}

.gb-shell .gemz-svg-marker {
  stroke: var(--gemz-marker);
  stroke-width: 1.2;
  stroke-dasharray: 4 2;
}

.gb-shell .gemz-svg-tick {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 10px;
  fill: var(--gemz-body-ink);
}

/* Face 3: CP/M AUTOCON Console */
.gb-shell .autocon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gb-shell .autocon-terminal {
  border: 2px solid var(--gb-ink);
  background-color: var(--gb-surface);
  min-width: 0;
}

.gb-shell .autocon-trend-box {
  margin-top: 18px;
}

.gb-shell .autocon-bar {
  background-color: var(--gb-ink);
  color: var(--paper);
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.gb-shell .autocon-pre {
  padding: 14px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--gb-ink);
  background-color: var(--gb-surface);
  overflow-x: auto;
  white-space: pre;
  max-width: 100%;
}

@media (max-width: 960px) {
  .gb-shell .hero-main,
  .gb-shell .hero-stat,
  .gb-shell .split-left,
  .gb-shell .split-right {
    grid-column: 1 / -1;
  }

  .gb-shell .hero-stat {
    border-left: none;
    border-top: 1px solid var(--hair);
    padding-left: 0;
    padding-top: 18px;
  }

  .gb-shell .cols-3,
  .gb-shell .cols-2,
  .gb-shell .kpi-strip,
  .gb-shell .gemz-aes-grid,
  .gb-shell .autocon-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .gb-shell {
    padding: 16px 16px 48px;
  }

  .gb-shell .full-band {
    padding: 20px 16px;
  }

  .gb-shell .print-report {
    padding: 18px 14px;
  }

  .gb-shell .ctrl-select {
    width: 100%;
  }

  .gb-shell .tau-controls {
    gap: 10px 12px;
  }
}

@media print {
  @page {
    size: letter portrait;
    margin: 0.45in;
  }

  body.gb-body {
    background-color: #FFFFFF;
    color: #111827;
    padding: 0;
    font-size: 10pt;
    line-height: 1.4;
  }

  .ns-split-bar,
  .zs-footer,
  .gb-shell .zs-licensing-band,
  .gb-shell .const-banner,
  .gb-shell .hero-head,
  .gb-shell .full-band,
  .gb-shell .toolbar,
  .gb-shell .no-print {
    display: none;
  }

  .gb-shell {
    max-width: 100%;
    padding: 0;
  }

  .gb-shell .print-report {
    margin-top: 0;
    padding: 0;
    border: none;
    background-color: #FFFFFF;
    page-break-inside: avoid;
  }

  .gb-shell .print-disclaimer {
    background-color: #EFECE4;
  }

  .gb-shell table {
    font-size: 9pt;
  }

  .gb-shell th,
  .gb-shell td {
    padding: 6px 8px 6px 0;
  }
}
