/* IRIS UI — contained model surface */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg:          #F8F6F1;
  --shell-bg:    #F3F0EA;
  --bg-grid:     #FFFFFF;
  --bg-header:   #F8F6F1;
  --bg-panel:    rgba(248, 246, 241, 0.93);
  --bg-input:    #FFFFFF;
  --bg-overlay:  rgba(248, 246, 241, 0.96);
  --surface:     #FFFFFF;
  --gridline:    #E6E6E0;
  --border:      rgba(49, 79, 115, 0.16);
  --fg:          #1F2E3D;
  --fg-dim:      #6A7882;
  --fg-muted:    #314F73;
  --accent:      #54789C;
  --accent-dark: #314F73;
  --accent-light:#D8E6EC;
  --accent-wash: #F3F0EA;
  --accent-glow: rgba(84, 120, 156, 0.18);
  --accent-dim:  rgba(84, 120, 156, 0.30);
  --sel-fill:    rgba(84, 120, 156, 0.10);
  --sel-border:  rgba(84, 120, 156, 0.45);
  --dirty:       #B7791F;
  --error:       #D6455D;
  --success:     #54789C;
  --font:        -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  --mono:        'JetBrains Mono', 'SF Mono', 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  --surface-2:   #F8F6F1;
  --grid-strong: #D8E6EC;
  --select:      #54789C;
  --shadow:      0 28px 84px rgba(49, 79, 115, 0.14);
  --ring:        0 0 0 2px rgba(84, 120, 156, 0.24);
  --motion-fast: 150ms ease-out;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%; height: 100%;
  font-family: var(--font);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(circle at 6% 12%, rgba(216, 230, 236, 0.46), rgba(216, 230, 236, 0) 28%),
    radial-gradient(circle at 96% 88%, rgba(169, 189, 201, 0.20), rgba(169, 189, 201, 0) 27%),
    linear-gradient(rgba(84, 120, 156, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 120, 156, 0.022) 1px, transparent 1px),
    linear-gradient(135deg, #F8F6F1 0%, #F3F0EA 100%);
  background-size: auto, auto, 28px 28px, 28px 28px, auto;
  color: var(--fg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─────────────────────────────────────────────
   Layout
   ───────────────────────────────────────────── */

#app {
  display: flex; flex-direction: column;
  position: relative;
  width: calc(100% - 36px); height: calc(100% - 36px);
  margin: 18px;
  overflow: hidden;
  border: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    #D8E6EC 0%,
    #F8F6F1 42%,
    #F3F0EA 100%
  );
  box-shadow:
    0 18px 46px rgba(49, 79, 115, 0.11),
    0 4px 14px rgba(31, 42, 46, 0.05),
    inset 0 1px 0 rgba(255,255,255,0.86),
    inset 0 0 0 1px rgba(255,255,255,0.38);
  backdrop-filter: blur(8px) saturate(104%);
}

body.embedded {
  background: transparent;
}

body.embedded #app {
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ─── Entry-first Model Home ─── */

body.model-home-active #prod-banner,
body.model-home-active #readonly-banner,
body.model-home-active #formulabar,
body.model-home-active #main,
body.model-home-active #bottombar,
body.model-home-active #primary-action-status,
body.model-home-active #workspace-surface-switcher,
body.model-home-active #dirty-chip,
body.model-home-active #model-name,
body.model-home-active #model-run-state-chip,
body.model-home-active #snap-chip,
body.model-home-active #health-chip,
body.model-home-active #version-select,
body.model-home-active #btn-entry-surface,
body.model-home-active #primary-actions,
body.model-home-active #manual-actions,
body.model-home-active #btn-schedule-run,
body.model-home-active #btn-new-model,
body.model-home-active #btn-zone-mode,
body.model-home-active #btn-focus-mode,
body.model-home-active #btn-product-guide {
  display: none !important;
}

html.model-entry-bootstrap-pending body.model-home-active #model-home {
  display: none !important;
}

html.model-entry-bootstrap-pending #hosted-workspace-loading[hidden] {
  display: flex !important;
}

body.model-home-active #runtime-identity {
  display: inline;
}

body.model-home-model-selected.model-home-active #runtime-identity {
  display: inline;
}

body.model-home-model-selected.model-home-active #workspace-surface-switcher {
  display: inline-flex !important;
}

body.model-home-model-selected.model-home-active #dirty-chip,
body.model-home-model-selected.model-home-active #snap-chip,
body.model-home-model-selected.model-home-active #version-select {
  display: inline-flex !important;
}

body.model-home-active #app {
  border-color: rgba(49, 79, 115, 0.34);
  border-radius: 4px;
  background:
    linear-gradient(rgba(49, 79, 115, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 79, 115, 0.038) 1px, transparent 1px),
    linear-gradient(rgba(49, 79, 115, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 79, 115, 0.018) 1px, transparent 1px),
    linear-gradient(135deg, #F8F6F1 0%, #F3F0EA 52%, #D8E6EC 100%);
  background-size: 104px 104px, 104px 104px, 13px 13px, 13px 13px, auto;
  box-shadow:
    0 16px 42px rgba(49, 79, 115, 0.10),
    0 3px 10px rgba(31, 42, 46, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.70),
    inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px) saturate(104%);
}

body.model-home-active #menubar {
  display: none;
}

body.model-home-active .model-name {
  gap: 8px;
  color: rgba(31, 46, 61, 0.92);
  font-size: 14px;
  font-weight: 780;
}

body.model-home-active .model-name-label {
  color: rgba(49, 79, 115, 0.72);
  font-size: 10px;
  font-weight: 520;
}

body.model-home-active .model-name-value {
  color: rgba(31, 46, 61, 0.94);
}

.model-home {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  padding: 158px 26px 176px;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  box-sizing: border-box;
}

.model-home::before,
.model-home::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.model-home::before {
  inset: 18px 22px;
  border: 1px solid rgba(49, 79, 115, 0.34);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(49, 79, 115, 0.28) 34px, transparent 34px, transparent calc(100% - 34px), rgba(49, 79, 115, 0.28) calc(100% - 34px)) 0 18px / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(49, 79, 115, 0.28) 34px, transparent 34px, transparent calc(100% - 34px), rgba(49, 79, 115, 0.28) calc(100% - 34px)) 0 calc(100% - 18px) / 100% 1px no-repeat,
    linear-gradient(rgba(49, 79, 115, 0.28) 34px, transparent 34px, transparent calc(100% - 34px), rgba(49, 79, 115, 0.28) calc(100% - 34px)) 18px 0 / 1px 100% no-repeat,
    linear-gradient(rgba(49, 79, 115, 0.28) 34px, transparent 34px, transparent calc(100% - 34px), rgba(49, 79, 115, 0.28) calc(100% - 34px)) calc(100% - 18px) 0 / 1px 100% no-repeat,
    repeating-linear-gradient(90deg, transparent 0 75px, rgba(49, 79, 115, 0.13) 75px 76px, transparent 76px 150px),
    repeating-linear-gradient(0deg, transparent 0 73px, rgba(49, 79, 115, 0.10) 73px 74px, transparent 74px 146px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.model-home::after {
  inset: 18px 22px;
  border: 1px solid rgba(49, 79, 115, 0.16);
  border-radius: 0;
  background:
    linear-gradient(rgba(49, 79, 115, 0.16), rgba(49, 79, 115, 0.16)) 0 108px / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(49, 79, 115, 0.12), rgba(49, 79, 115, 0.12)) 82% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(49, 79, 115, 0.12), rgba(49, 79, 115, 0.12)) 0 50% / 100% 1px no-repeat;
  box-shadow: none;
  contain: paint;
}

.model-home-sheet-border,
.model-home-registration,
.model-home-side-label,
.model-home-coordinate-row,
.model-home-title-block {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  color: rgba(49, 79, 115, 0.88);
}

.model-home-sheet-border {
  inset: 30px 34px;
  border: 1px solid rgba(49, 79, 115, 0.22);
}

.model-home-registration {
  left: 50%;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(49, 79, 115, 0.34);
  border-radius: 50%;
  transform: translateX(-50%);
}

.model-home-registration::before,
.model-home-registration::after {
  content: "";
  position: absolute;
  background: rgba(49, 79, 115, 0.30);
}

.model-home-registration::before {
  left: -9px;
  right: -9px;
  top: 50%;
  height: 1px;
}

.model-home-registration::after {
  top: -9px;
  bottom: -9px;
  left: 50%;
  width: 1px;
}

.model-home-registration-top {
  top: 14px;
}

.model-home-registration-bottom {
  bottom: 14px;
}

.model-home-side-label {
  top: 52%;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.model-home-side-label-left {
  left: 18px;
  transform: translateY(-50%) rotate(180deg);
}

.model-home-side-label-right {
  right: 18px;
  transform: translateY(-50%);
}

.model-home-coordinate-row {
  left: 60px;
  right: 60px;
  display: flex;
  justify-content: space-between;
  font: 500 8px/1 var(--mono);
  letter-spacing: 0.10em;
}

.model-home-coordinate-row-top {
  top: 132px;
}

.model-home-coordinate-row-bottom {
  bottom: 32px;
}

.model-home-title-block {
  border: 1px solid rgba(49, 79, 115, 0.28);
  background: rgba(248, 246, 241, 0.34);
}

.model-home-title-block-primary {
  left: 34px;
  top: 30px;
  width: min(780px, 54vw);
  height: 108px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 20px 38px;
  border-left: 0;
  border-top: 0;
}

.model-home-brand-line {
  display: flex;
  align-items: baseline;
  gap: 32px;
  min-width: 0;
}

.model-home-brand-name {
  color: #314F73;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.38em;
}

.model-home-brand-maker,
.model-home-system-label {
  color: rgba(49, 79, 115, 0.84);
  font: 600 11px/1.2 var(--mono);
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.model-home-system-label {
  letter-spacing: 0.22em;
}

.model-home-title-block-surface {
  top: 30px;
  right: 34px;
  width: min(312px, 28vw);
  min-height: 108px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
}

.model-home-sheet-cell,
.model-home-ledger-cell {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 14px 18px;
  border-left: 1px solid rgba(49, 79, 115, 0.22);
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  font-family: var(--mono);
  text-transform: uppercase;
}

.model-home-sheet-cell:first-child,
.model-home-ledger-cell:first-child {
  border-left: 0;
}

.model-home-sheet-cell-full {
  grid-column: 1 / -1;
}

.model-home-sheet-cell span,
.model-home-ledger-cell span {
  color: rgba(49, 79, 115, 0.62);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.model-home-sheet-cell strong,
.model-home-ledger-cell strong {
  min-width: 0;
  color: #314F73;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.model-home-title-block-ledger {
  right: 34px;
  bottom: 30px;
  width: min(560px, 40vw);
  display: grid;
  grid-template-columns: 1fr 1.4fr 0.9fr 0.9fr;
}

.model-home-ledger-cell {
  min-height: 54px;
  padding: 12px 16px;
}

.model-home-ledger-cell-wide {
  grid-column: span 2;
}

.model-home[hidden] {
  display: none !important;
}

.model-home-layout {
  width: min(1138px, calc(100% - 168px));
  max-width: 100%;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 842px) 260px;
  align-items: start;
  gap: 36px;
  box-sizing: border-box;
  transform: translateY(-8px);
}

.model-home-shell {
  width: 100%;
  max-width: 100%;
  min-height: 518px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 18px;
  box-sizing: border-box;
}

@media (min-width: 901px) {
  .model-home-shell {
    height: 518px;
  }
}

.search-context-rail {
  min-width: 0;
  min-height: 518px;
  padding: 0 0 0 24px;
  border-left: 1px solid rgba(49, 79, 115, 0.16);
  color: rgba(49, 79, 115, 0.62);
  box-sizing: border-box;
}

#search-context-rail-title {
  margin: 0 0 14px;
  padding: 0 0 9px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
  color: rgba(49, 79, 115, 0.66);
  font: 650 10px/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.search-context-rail-structure {
  display: grid;
  gap: 13px;
}

.search-context-rail-structure > span {
  display: block;
  height: 1px;
  background: rgba(49, 79, 115, 0.14);
}

.search-context-rail-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.14);
}

.search-context-rail-row {
  display: grid;
  gap: 4px;
  min-height: 38px;
  align-content: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.10);
}

.search-context-rail-row-label {
  min-width: 0;
  color: rgba(31, 42, 46, 0.72);
  font: 600 10.5px/1.25 var(--mono);
  letter-spacing: 0.03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-context-rail-row-meta,
.search-context-rail-state {
  color: rgba(49, 79, 115, 0.48);
  font: 560 9.5px/1.35 var(--mono);
  letter-spacing: 0.07em;
}

.search-context-rail-state {
  padding-top: 2px;
}

body.model-home-model-selected .model-home-shell {
  width: min(1240px, 100%);
  gap: 0;
}

body.model-home-model-selected .model-home-layout {
  width: min(1240px, 100%);
  grid-template-columns: minmax(0, 1fr);
}

body.model-home-model-selected .search-context-rail {
  display: none;
}

body.model-home-model-selected.model-home-active .model-home {
  align-items: center;
}

body.model-home-model-selected .model-home-heading {
  display: grid;
}

.model-home-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  justify-items: start;
}

.model-home-heading-copy {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  text-align: left;
  padding-left: 30px;
}

.model-home h1 {
  color: #314F73;
  max-width: 100%;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}

.model-home-helper {
  display: block;
  max-width: 260px;
  margin-top: 12px;
  color: rgba(49, 79, 115, 0.78);
  font: 500 11px/1.7 var(--mono);
  letter-spacing: 0.14em;
}

.model-home-search-wrap {
  display: grid;
  grid-template-columns: 1fr 138px;
  position: relative;
  height: 72px;
  margin-top: 20px;
  border: 1px solid rgba(49, 79, 115, 0.52);
  background: rgba(248, 246, 241, 0.62);
}

.model-home-search-wrap:focus-within {
  border-color: rgba(49, 79, 115, 0.72);
  box-shadow: inset 0 0 0 1px rgba(49, 79, 115, 0.24);
}

.model-home-search-wrap::before {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -1;
  border: 1px solid rgba(49, 79, 115, 0.24);
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(49, 79, 115, 0.28) 14px, transparent 14px) left -1px top -1px / 44px 1px no-repeat,
    linear-gradient(90deg, rgba(49, 79, 115, 0.28) 14px, transparent 14px) right -31px top -1px / 44px 1px no-repeat,
    linear-gradient(90deg, rgba(49, 79, 115, 0.28) 14px, transparent 14px) left -1px bottom -1px / 44px 1px no-repeat,
    linear-gradient(90deg, rgba(49, 79, 115, 0.28) 14px, transparent 14px) right -31px bottom -1px / 44px 1px no-repeat,
    rgba(248, 246, 241, 0.24);
  box-shadow:
    0 8px 18px rgba(49, 79, 115, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.model-home-search-wrap::after {
  content: "";
  position: absolute;
  left: 60px;
  right: 138px;
  bottom: -62px;
  height: 1px;
  background: rgba(49, 79, 115, 0.26);
  pointer-events: none;
}

.model-home-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.model-home-search {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.34);
  color: var(--fg);
  font: 500 14px var(--mono);
  letter-spacing: 0.06em;
  line-height: 70px;
  outline: none;
  padding: 0 28px 0 68px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(49, 79, 115, 0.08);
  backdrop-filter: none;
}

.model-home-portfolio-controls {
  display: grid;
  gap: 6px;
  color: rgba(49, 79, 115, 0.72);
}

.model-home-portfolio-label {
  color: rgba(49, 79, 115, 0.66);
  font: 650 10px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.model-home-portfolio-row {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.model-home-portfolio-filter {
  min-width: 186px;
  height: 30px;
  border: 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.38);
  border-radius: 0;
  background: transparent;
  color: rgba(31, 42, 46, 0.86);
  font: 560 12px/1 var(--font);
  outline: none;
  cursor: pointer;
}

.model-home-portfolio-filter:focus {
  border-bottom-color: rgba(49, 79, 115, 0.72);
  box-shadow: 0 1px 0 rgba(49, 79, 115, 0.22);
}

.model-home-new-portfolio {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.64);
  font: 560 11px/1 var(--font);
  cursor: pointer;
}

.model-home-new-portfolio:hover,
.model-home-new-portfolio:focus {
  color: rgba(49, 79, 115, 0.88);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.model-home-new-portfolio:disabled,
.model-home-portfolio-filter:disabled {
  color: rgba(49, 65, 72, 0.34);
  cursor: default;
  text-decoration: none;
}

.model-home-search:focus {
  box-shadow:
    inset 0 0 0 2px rgba(84, 120, 156, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.70);
}

.model-home-search-icon {
  position: absolute;
  left: 30px;
  top: 50%;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(49, 79, 115, 0.88);
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.model-home-search-icon::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -4px;
  width: 10px;
  height: 1px;
  background: rgba(49, 79, 115, 0.88);
  transform: rotate(45deg);
  transform-origin: left center;
}

.model-home-search-command {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.38);
  color: #314F73;
  background: rgba(248, 246, 241, 0.40);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.model-home-search-command::before {
  content: "\21B5";
  margin-right: 12px;
  font-size: 13px;
  letter-spacing: 0;
}

.model-home-provenance {
  position: fixed;
  left: 78px;
  bottom: 78px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(49, 79, 115, 0.72);
  pointer-events: none;
}

.model-home-rm-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(49, 79, 115, 0.50);
  border-radius: 50%;
  color: rgba(49, 79, 115, 0.86);
  font: 400 27px/1 Georgia, 'Times New Roman', serif;
  letter-spacing: 0.05em;
}

.model-home-provenance-copy {
  display: grid;
  gap: 9px;
  color: rgba(49, 79, 115, 0.72);
  font: 600 10px/1.25 var(--mono);
  letter-spacing: 0.20em;
  text-transform: uppercase;
}

.model-home-provenance-copy::before {
  content: "";
  width: 264px;
  height: 1px;
  background: rgba(49, 79, 115, 0.24);
}

@media (max-width: 900px) {
  .model-home {
    align-items: flex-start;
    padding: 172px 26px 260px;
  }

  .model-home-title-block-primary,
  .model-home-title-block-surface,
  .model-home-title-block-ledger {
    left: 30px;
    right: 30px;
    width: auto;
  }

  .model-home-title-block-primary {
    height: 96px;
    padding: 18px 20px;
  }

  .model-home-title-block-surface {
    top: 132px;
    grid-template-columns: minmax(0, 1fr) 70px;
  }

  .model-home-title-block-ledger {
    bottom: 30px;
    grid-template-columns: 1fr 1fr;
  }

  .model-home-brand-line {
    gap: 18px;
  }

  .model-home-brand-name {
    font-size: 30px;
  }

  .model-home-brand-maker,
  .model-home-system-label {
    font-size: 8px;
  }

  .model-home-layout {
    width: min(100%, 760px);
    margin-top: 96px;
    transform: none;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .model-home-shell {
    width: 100%;
  }

  .search-context-rail {
    min-height: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(49, 79, 115, 0.14);
    border-left: 0;
  }

  .model-home-heading {
    grid-template-columns: minmax(0, 1fr);
  }

  .model-home h1 {
    white-space: normal;
  }

  .model-home-search-wrap {
    grid-template-columns: 1fr 104px;
  }

  .model-home-search-wrap::after {
    display: none;
  }

  .model-home-search-command {
    font-size: 10px;
  }

  .model-home-provenance,
  .model-home-side-label,
  .model-home-coordinate-row {
    display: none;
  }
}

@media (max-width: 620px) {
  .model-home {
    padding: 188px 18px 290px;
  }

  .model-home::before,
  .model-home::after {
    inset: 12px;
  }

  .model-home-sheet-border {
    inset: 22px;
  }

  .model-home-title-block-primary,
  .model-home-title-block-surface,
  .model-home-title-block-ledger {
    left: 22px;
    right: 22px;
  }

  .model-home-title-block-surface,
  .model-home-title-block-ledger {
    grid-template-columns: 1fr 1fr;
  }

  .model-home-layout {
    margin-top: 118px;
  }

  .model-home-heading-copy {
    padding-left: 0;
  }

  .model-home-search-wrap {
    grid-template-columns: minmax(0, 1fr);
    height: 64px;
  }

  .model-home-portfolio-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .model-home-portfolio-filter {
    width: 100%;
  }

  .model-home-search-command {
    display: none;
  }

  .model-home-search {
    height: 100%;
    line-height: 62px;
    padding-left: 54px;
  }

  .model-home-search-icon {
    left: 22px;
  }
}

.model-home-create {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-height: 20px;
  margin: 5px 2px 0;
  padding: 8px 0 0;
  border-top: 1px solid rgba(49, 79, 115, 0.18);
}

.model-home-create[hidden] {
  display: none !important;
}

.model-home-create-label {
  color: rgba(49, 79, 115, 0.58);
  font-size: 10px;
  font-weight: 500;
  font-family: var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.model-create-menu {
  position: relative;
  flex: 0 0 auto;
}

.model-create-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 120;
  min-width: 178px;
  padding: 5px;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 6px;
  background: rgba(250, 250, 248, 0.98);
  box-shadow: 0 12px 28px rgba(31, 42, 46, 0.14);
}

.topbar-model-create .model-create-dropdown {
  left: auto;
  right: 0;
}

.model-create-option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(31, 42, 46, 0.74);
  font: 500 11px var(--font);
  text-align: left;
  padding: 7px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.model-create-option:hover,
.model-create-option:focus {
  color: var(--fg);
  background: rgba(84, 120, 156, 0.08);
  outline: none;
}

.model-home-new {
  flex: 0 0 auto;
  min-height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.58);
  font: 560 10px var(--font);
  cursor: pointer;
}

.model-home-new:hover,
.model-home-new:focus {
  color: rgba(49, 79, 115, 0.82);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.model-home-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 0 2px 6px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  color: rgba(49, 79, 115, 0.76);
  font: 600 10px/1.2 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.model-home-lifecycle-filter {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: 0;
  min-height: 30px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.30);
  background: transparent;
}

.model-home-lifecycle-option {
  min-width: 86px;
  min-height: 28px;
  border: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.30);
  border-radius: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.64);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

.model-home-lifecycle-option:hover,
.model-home-lifecycle-option:focus {
  color: var(--fg);
  outline: none;
}

.model-home-lifecycle-option.active {
  color: #314F73;
  background:
    linear-gradient(rgba(49, 79, 115, 0.24), rgba(49, 79, 115, 0.24)) left bottom / 100% 2px no-repeat,
    rgba(255, 255, 255, 0.30);
  box-shadow: inset 0 0 0 1px rgba(49, 79, 115, 0.10);
}

#model-home-list-title {
  color: var(--fg);
  font-size: 12px;
  font-weight: 760;
}

.model-home-results {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.22);
  border-left: 1px solid rgba(49, 79, 115, 0.16);
  border-right: 1px solid rgba(49, 79, 115, 0.16);
}

.model-home-result {
  position: relative;
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.30);
  color: var(--fg);
}

.model-home-result-open {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 10px 10px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.model-home-result:hover,
.model-home-result:focus-within {
  background: rgba(255, 255, 255, 0.56);
}

.model-home-result-open:focus,
.model-home-result-meeting:focus,
.model-home-overflow:focus {
  outline: none;
}

.model-home-result-main {
  min-width: 0;
}

.model-home-result-name {
  display: block;
  color: var(--fg);
  font: 600 12px/1.2 var(--mono);
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-home-result-meeting {
  flex: 0 0 auto;
  min-height: 30px;
  margin-right: 8px;
  padding: 0 10px;
  border: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
  color: rgba(49, 79, 115, 0.92);
  font: 700 10px/1 var(--font);
  cursor: pointer;
}

.model-home-result-meeting:hover,
.model-home-result-meeting:focus {
  border-color: rgba(49, 79, 115, 0.34);
  background: rgba(255, 255, 255, 0.72);
}

.model-home-overflow {
  flex: 0 0 30px;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: rgba(49, 65, 72, 0.54);
  font: 760 15px/1 var(--font);
  letter-spacing: 0;
  cursor: pointer;
}

.model-home-overflow:hover,
.model-home-overflow:focus,
.model-home-overflow[aria-expanded="true"] {
  color: var(--fg);
  background: rgba(84, 120, 156, 0.08);
}

.model-home-menu {
  position: absolute;
  right: 8px;
  top: calc(100% + 4px);
  z-index: 130;
  min-width: 154px;
  padding: 5px;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 0;
  background: rgba(250, 250, 248, 0.98);
  box-shadow: 0 12px 28px rgba(31, 42, 46, 0.14);
}

.model-home-menu-item {
  display: block;
  width: 100%;
  min-height: 28px;
  padding: 7px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(31, 42, 46, 0.78);
  font: 560 11px var(--font);
  text-align: left;
  cursor: pointer;
}

.model-home-menu-item:hover,
.model-home-menu-item:focus {
  color: var(--fg);
  background: rgba(84, 120, 156, 0.08);
  outline: none;
}

.model-home-menu-item:disabled {
  color: rgba(49, 65, 72, 0.36);
  cursor: default;
}

.model-home-menu-divider {
  height: 1px;
  margin: 5px 4px;
  background: rgba(31, 42, 46, 0.10);
}

.model-home-result-meta {
  display: block;
  margin-top: 4px;
  color: rgba(49, 79, 115, 0.62);
  font: 500 10px/1.2 var(--mono);
  letter-spacing: 0.08em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-home-go {
  flex: 0 0 auto;
  color: var(--accent-dark);
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.model-home-empty {
  padding: 18px 14px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.30);
  color: rgba(49, 79, 115, 0.72);
  font: 500 11px/1.4 var(--mono);
  letter-spacing: 0.08em;
}

#model-archive-overlay,
#repository-portfolio-create-overlay,
#repository-portfolio-move-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(244, 247, 247, 0.58);
}

#model-archive-overlay.visible:not([hidden]),
#repository-portfolio-create-overlay.visible:not([hidden]),
#repository-portfolio-move-overlay.visible:not([hidden]) {
  display: flex;
}

#model-archive-overlay.visible #model-archive-modal,
#repository-portfolio-create-overlay.visible #repository-portfolio-create-modal,
#repository-portfolio-move-overlay.visible #repository-portfolio-move-modal {
  animation: modalIn 150ms ease-out;
}

#model-archive-modal,
#repository-portfolio-create-modal,
#repository-portfolio-move-modal {
  width: min(100%, 390px);
  padding: 20px 22px 18px;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 8px;
  background: rgba(250, 250, 248, 0.98);
  box-shadow: 0 22px 54px rgba(31, 42, 46, 0.16);
  color: var(--fg);
}

#model-archive-modal h2,
#repository-portfolio-create-modal h2,
#repository-portfolio-move-modal h2 {
  margin: 0 0 10px;
  color: var(--fg);
  font-size: 17px;
  font-weight: 760;
}

#model-archive-modal p {
  margin: 0 0 8px;
  color: rgba(49, 65, 72, 0.76);
  font-size: 13px;
  line-height: 1.45;
}

.model-archive-error {
  min-height: 18px;
  margin-top: 10px;
  color: rgba(110, 75, 30, 0.88);
  font-size: 12px;
}

.repository-portfolio-context {
  display: grid;
  gap: 4px;
  margin: 10px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.08);
}

.repository-portfolio-context span,
.repository-portfolio-field-label {
  color: rgba(49, 65, 72, 0.68);
  font-size: 11px;
  font-weight: 560;
}

.repository-portfolio-context strong {
  min-width: 0;
  color: var(--fg);
  font: 650 13px/1.35 var(--font);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.repository-portfolio-field-label {
  display: block;
  margin-top: 12px;
  margin-bottom: 5px;
}

#repository-portfolio-name,
#repository-portfolio-select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--fg);
  font: 12px var(--font);
  outline: none;
}

#repository-portfolio-name:focus,
#repository-portfolio-select:focus {
  border-color: rgba(49, 79, 115, 0.34);
  box-shadow: 0 0 0 3px rgba(49, 79, 115, 0.10);
}

.repository-portfolio-inline-new {
  min-height: 24px;
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.70);
  font: 560 11px/1 var(--font);
  cursor: pointer;
}

.repository-portfolio-inline-new:hover,
.repository-portfolio-inline-new:focus {
  color: rgba(49, 79, 115, 0.92);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.repository-portfolio-error {
  min-height: 18px;
  margin-top: 10px;
  color: rgba(110, 75, 30, 0.88);
  font-size: 12px;
}

.model-archive-actions,
.repository-portfolio-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.model-archive-cancel,
.model-archive-confirm,
.repository-portfolio-cancel,
.repository-portfolio-confirm {
  min-height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  font: 650 12px var(--font);
  cursor: pointer;
}

.model-archive-cancel,
.repository-portfolio-cancel {
  border: 1px solid rgba(31, 42, 46, 0.13);
  background: rgba(255, 255, 255, 0.64);
  color: rgba(49, 65, 72, 0.78);
}

.model-archive-confirm,
.repository-portfolio-confirm {
  border: 1px solid rgba(84, 120, 156, 0.24);
  background: rgba(84, 120, 156, 0.10);
  color: rgba(49, 79, 115, 0.96);
}

.model-archive-cancel:hover,
.model-archive-cancel:focus,
.model-archive-confirm:hover,
.model-archive-confirm:focus,
.repository-portfolio-cancel:hover,
.repository-portfolio-cancel:focus,
.repository-portfolio-confirm:hover,
.repository-portfolio-confirm:focus {
  outline: none;
  border-color: rgba(84, 120, 156, 0.38);
  background: rgba(255, 255, 255, 0.86);
}

.model-archive-confirm:disabled,
.repository-portfolio-cancel:disabled,
.repository-portfolio-confirm:disabled {
  color: rgba(49, 65, 72, 0.42);
  cursor: default;
}

.model-home-density {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px 18px 18px;
  position: relative;
  border: 1px solid rgba(49, 79, 115, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.16)),
    rgba(248, 246, 241, 0.34);
  box-shadow:
    0 24px 58px rgba(49, 79, 115, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.50);
}

.model-home-density[hidden] {
  display: none !important;
}

.timeline-surface {
  min-width: 0;
  min-height: 0;
  padding: 24px;
  overflow: auto;
  background: rgba(244, 247, 247, 0.72);
}

.timeline-surface:not([hidden]) {
  display: grid;
  align-content: start;
}

.model-home-density-orientation-label {
  color: rgba(49, 65, 72, 0.48);
  font-size: 9px;
  font-weight: 700;
  left: calc(18px + 5%);
  letter-spacing: 0.02em;
  line-height: 1;
  position: absolute;
  text-transform: uppercase;
  top: 6px;
}

.model-home-density-summary {
  color: rgba(75, 93, 100, 0.72);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.model-home-density-chart {
  display: grid;
  gap: 5px;
  justify-self: center;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0 4px;
  width: 90%;
}

/* ─── Menu bar ─── */

#menubar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  background: rgba(248, 246, 241, 0.74);
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
  height: 38px; min-height: 38px;
  user-select: none;
}

#menubar-left {
  display: flex; align-items: center; gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

#brand-lockup {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 auto;
  width: 126px;
  margin-right: 4px;
  line-height: 1;
}

#logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-size: 14px; font-weight: 720;
  color: var(--accent-dark);
  letter-spacing: 0.08em;
}

.app-brand-prompt {
  color: var(--accent);
}

.app-brand-name {
  color: inherit;
}

#runtime-identity {
  margin-top: 2px;
  color: rgba(49, 79, 115, 0.62);
  font-size: 7px;
  font-weight: 560;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hosted-workspace-loading {
  align-items: center;
  background: rgba(244, 250, 250, 0.92);
  backdrop-filter: blur(10px) saturate(112%);
  display: flex;
  inset: 0;
  justify-content: center;
  pointer-events: all;
  position: absolute;
  z-index: 80;
}

.hosted-workspace-loading[hidden] {
  display: none !important;
}

.hosted-workspace-loading-copy {
  color: var(--fg-muted);
  display: grid;
  gap: 6px;
  max-width: 360px;
  padding: 0 24px;
  text-align: center;
}

.hosted-workspace-loading-title {
  color: var(--fg);
  font-size: 13px;
  font-weight: 560;
  line-height: 1.25;
}

.hosted-workspace-loading-subtitle {
  color: var(--fg-dim);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
}

body.hosted-workspace-loading-active #primary-action-status {
  display: none !important;
}

.model-name {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex: 0 1 min(460px, 36vw);
  min-width: 190px;
  max-width: min(460px, 36vw);
  color: var(--fg);
  font-size: 14px;
  font-weight: 780;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-name-label {
  flex: 0 0 auto;
  color: rgba(49, 79, 115, 0.58);
  font-size: 10px;
  font-weight: 520;
}

.model-name-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-timeline {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.16)),
    rgba(216, 230, 236, 0.18);
  border: 1px solid rgba(49, 79, 115, 0.15);
  border-radius: 6px;
  box-shadow:
    0 18px 44px rgba(49, 79, 115, 0.10),
    0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.50),
    inset 0 -1px 0 rgba(49, 79, 115, 0.05);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(112px, 0.20fr) minmax(0, 1fr);
  min-width: 0;
  padding: 13px 14px;
  width: min(720px, 100%);
}

.model-timeline-head {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.model-timeline-title {
  color: rgba(23, 38, 43, 0.94);
  font-size: 13px;
  font-weight: 760;
  white-space: nowrap;
}

.model-timeline-summary {
  color: rgba(75, 93, 100, 0.78);
  font-size: 10px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-timeline-presence {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.model-timeline-rail {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.model-timeline-rail-line {
  background: linear-gradient(90deg, rgba(17, 93, 105, 0.20), rgba(17, 93, 105, 0.58));
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.68);
  display: block;
  height: 1px;
  min-width: 0;
}

.model-timeline-rail-arrow {
  border-bottom: 4px solid transparent;
  border-left: 6px solid rgba(17, 93, 105, 0.58);
  border-top: 4px solid transparent;
  display: block;
  height: 0;
  width: 0;
}

.model-timeline-anchors {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 0;
}

.model-timeline-anchor,
.model-timeline-empty {
  color: rgba(23, 38, 43, 0.86);
  display: grid;
  font-size: 9.5px;
  font-weight: 720;
  justify-items: center;
  line-height: 1.15;
  min-width: 0;
}

.model-timeline-anchor {
  flex: 0 1 70px;
}

.model-timeline-node {
  background: rgba(17, 93, 105, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(19, 41, 46, 0.12);
  display: block;
  height: 6px;
  margin-bottom: 4px;
  width: 6px;
}

.model-timeline-anchor-label {
  max-width: 72px;
  min-width: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-timeline-today .model-timeline-node {
  background: rgba(23, 38, 43, 0.82);
}

.model-timeline-empty {
  color: rgba(75, 93, 100, 0.72);
  justify-items: start;
}

.model-through-time-density {
  display: grid;
  gap: 4px;
  justify-items: start;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 0;
}

.model-through-time-density-row {
  align-items: center;
  display: grid;
  gap: 5px;
  min-width: 0;
  width: max-content;
}

.model-through-time-density-head {
  color: rgba(75, 93, 100, 0.72);
  font-size: 9px;
  font-weight: 700;
}

.model-through-time-density-head .model-through-time-today {
  color: rgba(14, 41, 46, 0.96);
  font-weight: 860;
  transform: translateY(-1px);
}

.model-through-time-density-label {
  appearance: none;
  background: transparent;
  border: 0;
  color: rgba(23, 38, 43, 0.82);
  cursor: pointer;
  font: 760 10px var(--font);
  padding: 0 9px 0 0;
  text-align: right;
  white-space: nowrap;
}

.model-through-time-density-label:hover,
.model-through-time-density-label:focus {
  color: rgba(7, 91, 100, 0.96);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.model-through-time-density-cell {
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(20, 94, 102, 0.14);
  border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.56);
  cursor: pointer;
  display: inline-flex;
  font: 0/0 var(--font);
  aspect-ratio: 1 / 1;
  height: 14px;
  justify-content: center;
  padding: 0;
  width: 14px;
}

.model-through-time-density-cell.density-one {
  background: rgba(129, 203, 199, 0.92);
  border-color: rgba(10, 108, 116, 0.34);
}

.model-through-time-density-cell.density-some {
  background: rgba(30, 139, 145, 0.82);
  border-color: rgba(5, 89, 98, 0.44);
}

.model-through-time-density-cell.density-many {
  background: rgba(4, 88, 98, 0.94);
  border-color: rgba(2, 57, 65, 0.54);
}

.model-through-time-density-cell.today {
  border-color: rgba(7, 72, 80, 0.30);
}

.model-through-time-density-cell.selected {
  border-color: rgba(7, 72, 80, 0.88);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.92),
    0 0 0 4px rgba(7, 72, 80, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.model-through-time-day-bundle[hidden] {
  display: none !important;
}

.model-through-time-day-bundle {
  border-top: 1px solid rgba(8, 74, 82, 0.18);
  color: rgba(49, 65, 72, 0.74);
  display: grid;
  font-size: 10px;
  gap: 6px;
  margin-top: 2px;
  min-width: 0;
  padding-top: 8px;
}

.model-through-time-bundle-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: flex-start;
  min-width: 0;
}

.model-through-time-bundle-head span:first-child {
  color: rgba(23, 38, 43, 0.92);
  font-size: 10px;
  font-weight: 760;
}

.model-through-time-bundle-sections {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.model-through-time-bundle-sections section {
  min-width: 0;
}

.model-through-time-bundle-sections strong {
  color: rgba(75, 93, 100, 0.78);
  display: block;
  font-size: 9px;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.model-through-time-bundle-sections ul {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.model-through-time-bundle-sections li {
  min-width: 0;
}

.model-through-time-bundle-sections li span,
.model-through-time-bundle-sections li small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-through-time-bundle-sections li span {
  color: rgba(23, 38, 43, 0.86);
  font-weight: 680;
}

.model-through-time-bundle-sections li small {
  color: rgba(75, 93, 100, 0.66);
  font-size: 8.5px;
}

.model-through-time-empty,
.model-through-time-artifact-empty {
  color: rgba(75, 93, 100, 0.72);
  font-size: 10px;
  font-weight: 620;
}

.workspace-surface-switcher {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  height: 26px;
  padding: 2px;
  border: 1px solid rgba(49, 79, 115, 0.14);
  border-radius: 6px;
  background: rgba(248, 246, 241, 0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.58);
}

.workspace-surface-btn {
  height: 20px;
  min-width: 0;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: rgba(49, 79, 115, 0.62);
  font: 650 10px var(--font);
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.workspace-surface-btn:hover {
  color: rgba(31, 46, 61, 0.86);
  background: rgba(255, 255, 255, 0.5);
}

.workspace-surface-btn.active,
.workspace-surface-btn[aria-pressed="true"] {
  color: rgba(49, 79, 115, 0.96);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(84, 120, 156, 0.28);
  box-shadow: 0 1px 4px rgba(49, 79, 115, 0.08);
}

#primary-actions {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: 8px;
  white-space: nowrap;
}

.product-internal[hidden],
[hidden] {
  display: none !important;
}

.menu-item {
  padding: 4px 10px;
  color: var(--fg-muted);
  font-size: 11px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.12s, background 0.12s;
}
.menu-item:hover {
  color: var(--fg);
  background: rgba(255,255,255,0.32);
}

#menubar-right {
  display: flex; align-items: center; gap: 8px;
  flex: 0 0 auto;
  min-width: max-content;
  justify-content: flex-end;
  margin-left: auto;
  white-space: nowrap;
}

#health-chip,
#snap-chip {
  display: none;
}

.status-chip {
  font-size: 9.5px;
  color: rgba(67, 84, 91, 0.78);
  display: flex; align-items: center; gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.edit-state-chip {
  color: rgba(82, 101, 108, 0.58);
}

#dirty-chip {
  margin-left: 3px;
  flex: 0 1 auto;
  max-width: 132px;
  overflow: hidden;
}

#dirty-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-run-state-chip {
  margin-left: 3px;
  max-width: 160px;
  color: rgba(67, 84, 91, 0.74);
}

#model-run-state-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-state-label {
  color: rgba(67, 84, 91, 0.70);
  font-size: 9.5px;
  font-weight: 560;
  margin-left: 2px;
}
.status-chip .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
}
.dot-clean { background: var(--success); }
.dot-dirty { background: var(--dirty); }
.dot-sync  { background: var(--fg-dim); }

.topbar-action {
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 1px solid rgba(49, 79, 115, 0.14);
  border-radius: 5px;
  background: rgba(255,255,255,0.46);
  color: rgba(49, 79, 115, 0.74);
  font: 500 11px var(--font);
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast), transform var(--motion-fast);
}
.topbar-action:hover:not(:disabled) {
  color: var(--fg);
  border-color: rgba(84, 120, 156, 0.32);
  background: rgba(255,255,255,0.7);
}
.topbar-action:active:not(:disabled) {
  transform: translateY(1px);
}
.topbar-action:disabled {
  opacity: 0.32;
  cursor: default;
}

#btn-zone-mode {
  flex: 0 0 auto;
}

#btn-focus-mode {
  flex: 0 0 auto;
}

#btn-zone-mode[aria-pressed="true"] {
  background: rgba(216, 230, 236, 0.78);
  border-color: rgba(84, 120, 156, 0.48);
  color: rgba(49, 79, 115, 0.96);
}

#btn-focus-mode[aria-pressed="true"] {
  background: rgba(248, 246, 241, 0.72);
  border-color: rgba(84, 120, 156, 0.38);
  color: rgba(49, 79, 115, 0.96);
}

.manual-actions {
  position: relative;
  flex: 0 0 auto;
}

.manual-actions-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(31, 42, 46, 0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.34);
  color: rgba(31, 42, 46, 0.58);
  font: 700 13px var(--font);
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.manual-actions-summary::-webkit-details-marker {
  display: none;
}

.manual-actions-summary:hover {
  color: var(--fg);
  background: rgba(255,255,255,0.62);
}

.manual-actions-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 100;
  min-width: 148px;
  padding: 6px;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 6px;
  background: rgba(250, 250, 248, 0.98);
  box-shadow: 0 12px 28px rgba(31, 42, 46, 0.14);
}

.manual-action-item {
  width: 100%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: rgba(31, 42, 46, 0.72);
  font: 500 11px var(--font);
  text-align: left;
  padding: 7px 8px;
  cursor: pointer;
}

.manual-action-item:hover:not(:disabled) {
  color: var(--fg);
  background: rgba(15, 143, 152, 0.08);
}

.manual-action-item:disabled {
  opacity: 0.42;
  cursor: default;
}

.save-version-action {
  color: rgba(31, 42, 46, 0.82);
  background: rgba(255,255,255,0.58);
  border-color: rgba(31, 42, 46, 0.14);
}

.schedule-run-action {
  color: rgba(82, 101, 108, 0.58);
  background: rgba(255,255,255,0.26);
  border-color: rgba(31, 42, 46, 0.07);
  padding-inline: 10px;
}

.schedule-run-action:hover:not(:disabled) {
  color: rgba(31, 42, 46, 0.72);
  background: rgba(255,255,255,0.48);
}

.product-guide-action {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
}

.secondary-model-action {
  margin-left: 2px;
  margin-right: 3px;
  padding-inline: 10px;
  background: rgba(255,255,255,0.28);
  color: rgba(31, 42, 46, 0.56);
  border-color: rgba(31, 42, 46, 0.08);
}

.topbar-model-create {
  display: inline-flex;
  align-items: center;
}

.new-model-name-field {
  display: block;
  margin-top: 12px;
  margin-bottom: 5px;
  color: rgba(31, 42, 46, 0.62);
  font-size: 11px;
  font-weight: 560;
}

.new-model-optional {
  color: rgba(31, 42, 46, 0.44);
  font-weight: 500;
}

.new-model-type-field-secondary {
  margin-top: 2px;
  opacity: 0.72;
}

.new-model-type-field-secondary .new-model-name-field {
  margin-top: 10px;
}

#new-model-name,
#new-model-type,
#new-model-primary-security {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.78);
  color: var(--fg);
  font: 12px var(--font);
  outline: none;
}

#new-model-name:focus,
#new-model-type:focus,
#new-model-primary-security:focus {
  border-color: rgba(15, 143, 152, 0.34);
  box-shadow: 0 0 0 3px rgba(15, 143, 152, 0.10);
}

.new-model-bank-fields[hidden] {
  display: none !important;
}

/* ─── Formula bar ─── */

#formulabar {
  display: flex; align-items: center; gap: 0;
  background: rgba(255,255,255,0.44);
  border-bottom: 1px solid rgba(31, 42, 46, 0.10);
  height: 34px; min-height: 34px;
  padding: 0 12px;
}

.active-workbook-label {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 240px;
  padding: 0 0 0 8px;
  color: rgba(31, 42, 46, 0.82);
  font-size: 12px;
  font-weight: 650;
  line-height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#cell-addr {
  width: 56px; text-align: center;
  background: transparent; color: rgba(55, 72, 79, 0.86);
  border: none; border-right: 1px solid rgba(31, 42, 46, 0.13);
  padding: 0 6px;
  font-family: var(--mono); font-size: 11px;
  outline: none;
}

.cell-mark-status {
  min-width: 74px;
  padding: 0 8px;
  border-right: 1px solid rgba(31, 42, 46, 0.10);
  color: var(--fg-dim);
  font-size: 10px;
  line-height: 28px;
  white-space: nowrap;
}
.cell-mark-status.mark-assumption { color: var(--accent-dark); }
.cell-mark-status.mark-output { color: var(--accent); }
.cell-mark-status.mark-ai-formula {
  color: rgba(22, 102, 110, 0.86);
}
.cell-mark-status.llm-state-draft {
  color: rgba(75, 93, 100, 0.72);
}
.cell-mark-status.llm-state-pending_run {
  color: rgba(22, 102, 110, 0.78);
}
.cell-mark-status.llm-state-validated {
  color: rgba(9, 107, 117, 0.92);
}
.cell-mark-status.llm-state-stale {
  color: rgba(137, 91, 22, 0.86);
}
.cell-mark-status.llm-state-failed {
  color: rgba(154, 66, 65, 0.88);
}

.zone-critical-cue {
  margin: 0 8px;
  padding: 3px 9px;
  border: 1px solid rgba(31, 42, 46, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(61, 73, 79, 0.88);
  font: 600 10px var(--font);
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.zone-critical-cue:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(15, 143, 152, 0.26);
  color: rgba(31, 42, 46, 0.92);
}
.zone-critical-cue:disabled {
  opacity: 0.45;
  cursor: default;
}

.mark-btn {
  flex: 0 0 auto;
  height: 21px;
  margin-left: 3px;
  padding: 0 7px;
  border: 1px solid rgba(31, 42, 46, 0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  color: rgba(70, 86, 92, 0.76);
  font-family: var(--font);
  font-size: 9.5px;
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}
.mark-btn:hover:not(:disabled) {
  color: var(--fg);
  border-color: var(--accent);
  background: rgba(255,255,255,0.76);
}
.mark-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.mark-btn:disabled {
  opacity: 0.26;
  cursor: default;
  background: rgba(255,255,255,0.28);
  border-color: rgba(31, 42, 46, 0.08);
  color: rgba(107, 122, 128, 0.54);
}

.llm-open-definition[hidden] {
  display: none;
}

.llm-open-definition {
  color: var(--accent-dark);
  border-color: rgba(15, 143, 152, 0.24);
  background: rgba(216, 243, 245, 0.48);
}

.llm-open-definition:hover:not(:disabled) {
  color: var(--accent-dark);
  border-color: rgba(15, 143, 152, 0.42);
  background: rgba(216, 243, 245, 0.72);
}

.scenario-nav-btn {
  height: 22px;
  min-width: 22px;
  border: 1px solid rgba(31, 42, 46, 0.10);
  border-radius: 6px;
  background: rgba(255,255,255,0.42);
  color: var(--fg-muted);
  font-family: var(--font);
  font-size: 10px;
  cursor: pointer;
  transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}
.scenario-nav-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.76);
  border-color: rgba(15, 143, 152, 0.26);
}
.scenario-nav-btn:active:not(:disabled) {
  transform: translateY(1px);
}
.scenario-nav-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.results-surface {
  min-height: calc(100% - 16px);
  box-sizing: border-box;
  margin: 2px 0 0;
  padding: 0;
  border: 1px solid rgba(31, 42, 46, 0.20);
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  box-shadow:
    0 16px 30px rgba(16, 82, 90, 0.14),
    0 2px 8px rgba(31, 42, 46, 0.07),
    inset 0 1px 0 rgba(255,255,255,0.75);
  animation: surfaceIn 150ms ease-out;
  overflow: hidden;
  transition: background var(--motion-fast), box-shadow var(--motion-fast), border-color var(--motion-fast);
}

.run-activity-section {
  background: rgba(250, 253, 252, 0.82);
  border-bottom: 1px solid rgba(31, 42, 46, 0.12);
  padding: 12px 16px 10px;
}

.artifact-review-section {
  padding: 15px 16px 22px;
}

.run-activity-heading {
  color: #142126;
  font-size: 12.5px;
  font-weight: 760;
  line-height: 1.25;
  margin-bottom: 5px;
}

.results-title {
  color: #142126;
  font-size: 15px;
  font-weight: 780;
  margin-bottom: 6px;
}

.proof-on-demand-strip {
  opacity: 0.82;
}

.proof-on-demand-action {
  color: rgba(67, 84, 91, 0.78);
}
.run-context-line {
  color: rgba(80, 96, 103, 0.78);
  font-size: 10.5px;
  font-weight: 560;
  margin-bottom: 6px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.results-status {
  color: rgba(55, 72, 79, 0.76);
  font-size: 11px;
  line-height: 1.35;
  margin: 2px 0 10px;
}

.governed-replay-panel {
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 8px;
  background: rgba(248, 251, 250, 0.88);
  margin: 10px 0 14px;
  padding: 10px;
}
.governed-replay-heading {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}
.governed-replay-title {
  color: #142126;
  font-size: 12px;
  font-weight: 740;
  line-height: 1.25;
}
.governed-replay-subtitle {
  color: rgba(80, 96, 103, 0.76);
  font-size: 10.5px;
  line-height: 1.35;
  margin-top: 2px;
}
.governed-replay-badge {
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 999px;
  color: rgba(55, 72, 79, 0.78);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 680;
  line-height: 1;
  padding: 4px 7px;
}
.governed-replay-body h4 {
  color: rgba(20, 33, 38, 0.88);
  font-size: 11px;
  font-weight: 720;
  margin: 10px 0 5px;
}
.governed-replay-grid {
  border-top: 1px solid rgba(31, 42, 46, 0.08);
  display: grid;
  grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
}
.governed-replay-key,
.governed-replay-value {
  border-bottom: 1px solid rgba(31, 42, 46, 0.08);
  font-size: 10.5px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 5px 0;
}
.governed-replay-key {
  color: rgba(80, 96, 103, 0.78);
  font-weight: 680;
  padding-right: 10px;
}
.governed-replay-value {
  color: rgba(20, 33, 38, 0.92);
  font-variant-numeric: tabular-nums;
}
.governed-replay-limitations {
  color: rgba(55, 72, 79, 0.82);
  font-size: 10.5px;
  line-height: 1.4;
  margin: 0;
  padding-left: 18px;
}
.governed-replay-empty {
  color: rgba(80, 96, 103, 0.78);
  font-size: 11px;
  line-height: 1.4;
  padding: 4px 0;
}

#tab-scenarios {
  min-height: 0;
}
#tab-scenarios:not([hidden]) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  padding-bottom: 56px;
  scroll-padding-bottom: 56px;
}
.results-surface {
  flex: 0 0 auto;
}
.yap-panel-shell {
  border: 1px solid rgba(31,42,46,0.10);
  border-radius: 8px;
  background: rgba(255,255,255,0.64);
  color: rgba(55, 72, 79, 0.82);
  display: flex;
  flex-direction: column;
  font-size: 11px;
  height: 100%;
  line-height: 1.45;
  min-height: 0;
  padding: 12px;
}
.yap-panel-shell[hidden] {
  display: none !important;
}
.yap-panel-title {
  color: #17262B;
  font-size: 13px;
  font-weight: 720;
}
.yap-panel-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 6px;
}
.yap-panel-subtitle {
  color: rgba(75, 93, 100, 0.72);
  font-size: 9.5px;
  font-weight: 560;
  margin-top: 2px;
  overflow-wrap: anywhere;
}
.yap-panel-action,
.yap-send {
  appearance: none;
  border: 1px solid rgba(31,42,46,0.12);
  border-radius: 5px;
  background: rgba(255,255,255,0.76);
  color: #16666E;
  cursor: pointer;
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
  padding: 5px 7px;
}
.yap-panel-action:hover,
.yap-send:hover {
  border-color: rgba(15, 143, 152, 0.24);
  background: rgba(216, 243, 245, 0.56);
}
.yap-context-card,
.research-shell-context-card {
  border: 1px solid rgba(31,42,46,0.09);
  border-radius: 6px;
  background: rgba(248, 249, 250, 0.72);
  flex: 0 0 auto;
  margin-bottom: 5px;
  padding: 4px 6px;
}
.yap-context-kicker,
.research-shell-context-kicker {
  color: rgba(75, 93, 100, 0.78);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 3px;
}
.yap-context-grid,
.research-shell-context-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 2px 6px;
  align-items: baseline;
}
.yap-context-grid span,
.research-shell-context-grid span {
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
}
.yap-context-grid strong,
.research-shell-context-grid strong {
  color: #17262B;
  font-size: 8px;
  font-weight: 620;
  min-width: 0;
  overflow-wrap: anywhere;
}

.kpi-lookup-research-shell-context[hidden] {
  display: none !important;
}

.kpi-lookup-research-shell-evidence,
.kpi-lookup-research-shell-diagnostics {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(31,42,46,0.08);
}

.kpi-lookup-research-shell-evidence div,
.kpi-lookup-research-shell-diagnostics div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.kpi-lookup-research-shell-evidence strong,
.kpi-lookup-research-shell-diagnostics strong {
  color: #17262B;
  font-size: 8px;
  font-weight: 620;
}

.kpi-lookup-research-shell-evidence span,
.kpi-lookup-research-shell-diagnostics span {
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
}
.yap-panel-shell p {
  margin: 0 0 8px;
}
.yap-panel-shell p:last-child {
  margin-bottom: 0;
}
.yap-composer {
  flex: 0 0 auto;
  margin: 7px 0 0;
  border-top: 1px solid rgba(31,42,46,0.08);
  padding: 6px 0 0;
}
.yap-composer-label {
  color: rgba(75, 93, 100, 0.78);
  display: block;
  font-size: 9px;
  font-weight: 700;
  margin-bottom: 5px;
}
.yap-message-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 38px;
  resize: vertical;
  border: 1px solid rgba(31,42,46,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.86);
  color: #17262B;
  font-family: var(--font);
  font-size: 10.5px;
  line-height: 1.35;
  padding: 7px;
}
.yap-message-input:focus {
  outline: 2px solid rgba(15, 143, 152, 0.18);
  border-color: rgba(15, 143, 152, 0.28);
}
.yap-composer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}
.yap-status {
  color: rgba(75, 93, 100, 0.76);
  font-size: 9.5px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.yap-status.ok {
  color: #16666E;
}
.yap-status.error {
  color: #A23B28;
}
.yap-interrogation-placeholder {
  border: 1px solid rgba(31,42,46,0.10);
  border-radius: 6px;
  background: rgba(248, 249, 250, 0.84);
  flex: 0 0 auto;
  margin: 0 0 8px;
  padding: 7px 8px;
}
.yap-interrogation-placeholder[hidden] {
  display: none !important;
}
.yap-placeholder-kicker {
  color: rgba(75, 93, 100, 0.72);
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.yap-placeholder-title {
  color: #17262B;
  font-size: 10.5px;
  font-weight: 720;
  line-height: 1.25;
}
.yap-placeholder-copy {
  color: rgba(75, 93, 100, 0.78);
  font-size: 9.5px;
  line-height: 1.35;
  margin-top: 2px;
}
.yap-feed {
  display: grid;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}
.yap-empty {
  color: rgba(75, 93, 100, 0.72);
  font-size: 10px;
  line-height: 1.35;
  padding: 4px 0;
}
.yap-evidence-row,
.research-shell-entry {
  border-top: 1px solid rgba(31,42,46,0.08);
  padding: 8px 0 0;
}
.yap-evidence-meta,
.yap-evidence-provenance,
.research-shell-entry-meta,
.research-shell-entry-provenance {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  color: rgba(75, 93, 100, 0.72);
  font-size: 9px;
  font-weight: 650;
}
.yap-evidence-body,
.research-shell-entry-body {
  color: #17262B;
  font-size: 11.5px;
  line-height: 1.42;
  margin: 4px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.yap-external-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 2px 0 3px;
}
.yap-external-ref {
  background: rgba(31, 42, 46, 0.045);
  border: 1px solid rgba(31, 42, 46, 0.1);
  color: rgba(45, 62, 68, 0.78);
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yap-external-ref-muted {
  color: rgba(75, 93, 100, 0.62);
}
.yap-governed-answer-metadata {
  border-left: 2px solid rgba(31, 42, 46, 0.10);
  color: rgba(45, 62, 68, 0.70);
  display: grid;
  gap: 3px;
  margin: 4px 0 2px;
  padding: 2px 0 2px 6px;
}
.yap-governed-answer-metadata summary {
  cursor: pointer;
  list-style-position: inside;
}
.yap-governed-answer-header {
  color: rgba(23, 38, 43, 0.86);
  font-size: 8.75px;
  font-weight: 780;
  line-height: 1.25;
  text-transform: uppercase;
}
.yap-governed-answer-items {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  font-size: 8.5px;
  line-height: 1.25;
  min-width: 0;
}
.yap-governed-answer-items span {
  overflow-wrap: anywhere;
}
.yap-governed-answer-items strong {
  color: rgba(75, 93, 100, 0.72);
  font-weight: 720;
}
.yap-governed-answer-event {
  border-left: 3px solid rgba(15, 143, 152, 0.34);
  background: rgba(248, 252, 252, 0.78);
  color: rgba(35, 53, 59, 0.92);
  display: grid;
  gap: 6px;
  margin: 6px 0 4px;
  padding: 7px 8px 7px 9px;
}
.yap-governed-answer-section {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.yap-governed-answer-section-label {
  color: rgba(75, 93, 100, 0.72);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.2;
}
.yap-governed-answer-section-values,
.yap-governed-answer-handles {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  font-size: 9.5px;
  line-height: 1.32;
  min-width: 0;
}
.yap-governed-answer-section-values span,
.yap-governed-answer-handles span {
  overflow-wrap: anywhere;
}
.yap-governed-answer-handles {
  color: rgba(75, 93, 100, 0.66);
}
.yap-scenario-draft-card {
  background: rgba(248, 252, 252, 0.86);
  border: 1px solid rgba(15, 143, 152, 0.18);
  border-left: 3px solid rgba(15, 143, 152, 0.38);
  color: rgba(35, 53, 59, 0.92);
  display: grid;
  gap: 7px;
  margin: 7px 0 4px;
  padding: 8px 9px;
}
.yap-scenario-draft-header {
  align-items: center;
  color: rgba(23, 38, 43, 0.88);
  display: flex;
  flex-wrap: wrap;
  font-size: 8.75px;
  font-weight: 800;
  gap: 4px 8px;
  justify-content: space-between;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}
.yap-scenario-draft-header span:last-child,
.yap-scenario-draft-source,
.yap-scenario-draft-label {
  color: rgba(75, 93, 100, 0.72);
  font-size: 8.75px;
  font-weight: 720;
  line-height: 1.2;
}
.yap-scenario-draft-section,
.yap-scenario-draft-patches {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.yap-scenario-draft-value {
  color: rgba(23, 38, 43, 0.88);
  font-size: 10px;
  font-weight: 720;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.yap-scenario-draft-patch {
  align-items: baseline;
  display: grid;
  gap: 3px 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}
.yap-scenario-draft-patch span {
  color: rgba(23, 38, 43, 0.88);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.yap-scenario-draft-patch strong {
  color: rgba(23, 38, 43, 0.92);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
}
.yap-scenario-draft-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 1px;
}
.yap-scenario-draft-create,
.yap-scenario-draft-dismiss {
  appearance: none;
  border: 1px solid rgba(31, 42, 46, 0.13);
  cursor: pointer;
  font-family: var(--font);
  font-size: 8.75px;
  font-weight: 760;
  line-height: 1.2;
  padding: 3px 6px;
}
.yap-scenario-draft-create {
  background: rgba(15, 143, 152, 0.12);
  color: rgba(14, 91, 99, 0.92);
}
.yap-scenario-draft-dismiss {
  background: rgba(31, 42, 46, 0.04);
  color: rgba(45, 62, 68, 0.76);
}
.yap-scenario-draft-create:disabled,
.yap-scenario-draft-dismiss:disabled {
  cursor: default;
  opacity: 0.55;
}
.yap-scenario-draft-status {
  color: rgba(75, 93, 100, 0.72);
  font-size: 8.75px;
  font-weight: 700;
  line-height: 1.2;
}
.yap-scenario-draft-status.ok {
  color: rgba(14, 91, 99, 0.96);
}
.yap-scenario-draft-status.error {
  color: var(--error);
}
.yap-replay-control {
  margin: 3px 0;
}
.yap-replay-button {
  appearance: none;
  background: rgba(31, 42, 46, 0.04);
  border: 1px solid rgba(31, 42, 46, 0.1);
  color: rgba(45, 62, 68, 0.82);
  cursor: pointer;
  font-family: var(--font);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 5px;
}
.yap-message-selection,
.research-shell-message-selection {
  margin-top: 5px;
}
.yap-selection-request,
.research-shell-selection-request,
.yap-selection-review,
.yap-draft-memory-create {
  appearance: none;
  background: rgba(31, 42, 46, 0.04);
  border: 1px solid rgba(31, 42, 46, 0.1);
  color: rgba(45, 62, 68, 0.82);
  cursor: pointer;
  font-family: var(--font);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 5px;
}
.yap-source-selection-slot[hidden],
.research-shell-source-selection-slot[hidden] {
  display: none !important;
}
.yap-replay-inspection {
  border-left: 2px solid rgba(15, 143, 152, 0.22);
  color: rgba(45, 62, 68, 0.82);
  display: grid;
  gap: 3px;
  margin-top: 4px;
  padding: 2px 0 2px 6px;
}
.yap-replay-header,
.yap-replay-meta,
.yap-replay-item {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 6px;
  min-width: 0;
}
.yap-replay-header {
  color: rgba(23, 38, 43, 0.86);
  font-size: 8.5px;
  font-weight: 780;
  text-transform: uppercase;
}
.yap-replay-meta,
.yap-replay-item,
.yap-replay-empty {
  font-size: 8.5px;
  line-height: 1.25;
}
.yap-replay-source,
.yap-replay-ref,
.yap-replay-detail {
  overflow-wrap: anywhere;
}
.yap-replay-empty {
  color: rgba(75, 93, 100, 0.72);
}
.yap-source-selection,
.yap-candidate-review {
  border-left: 2px solid rgba(15, 143, 152, 0.22);
  color: rgba(45, 62, 68, 0.82);
  display: grid;
  gap: 5px;
  margin-top: 5px;
  padding: 2px 0 2px 6px;
}
.yap-source-selection-header,
.yap-candidate-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 3px 6px;
  color: rgba(23, 38, 43, 0.86);
  font-size: 8.5px;
  font-weight: 780;
  text-transform: uppercase;
}
.yap-candidate-boundary,
.yap-candidate-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 5px;
}
.yap-candidate-boundary span,
.yap-candidate-effects span {
  background: rgba(31, 42, 46, 0.04);
  border: 1px solid rgba(31, 42, 46, 0.08);
  color: rgba(75, 93, 100, 0.72);
  font-size: 8.5px;
  line-height: 1.25;
  padding: 1px 4px;
}
.yap-selection-items {
  display: grid;
  gap: 5px;
}
.yap-selection-row,
.yap-candidate-section,
.yap-draft-memory-action,
.yap-draft-memory-created,
.yap-draft-memory-failed {
  border-top: 1px solid rgba(31, 42, 46, 0.07);
  padding-top: 5px;
}
.yap-draft-memory-action {
  display: grid;
  gap: 5px;
}
.yap-draft-memory-action label {
  color: rgba(23, 38, 43, 0.86);
  display: grid;
  font-size: 8.5px;
  font-weight: 700;
  gap: 2px;
}
.yap-draft-memory-action input,
.yap-draft-memory-action textarea {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(31, 42, 46, 0.12);
  color: rgba(23, 38, 43, 0.88);
  font-family: var(--font);
  font-size: 9px;
  line-height: 1.3;
  min-width: 0;
  padding: 3px 5px;
}
.yap-draft-memory-action textarea {
  min-height: 48px;
  resize: vertical;
}
.yap-selection-row pre,
.yap-candidate-section pre,
.yap-selection-blocked pre,
.yap-draft-memory-failed pre {
  color: rgba(45, 62, 68, 0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 8.5px;
  line-height: 1.25;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.yap-candidate-label {
  color: rgba(23, 38, 43, 0.86);
  font-size: 8.5px;
  font-weight: 780;
}
.yap-projection-empty {
  color: rgba(75, 93, 100, 0.72);
  font-size: 8.5px;
  line-height: 1.25;
}
.yap-evidence-provenance,
.research-shell-entry-provenance {
  color: rgba(75, 93, 100, 0.64);
  font-weight: 560;
}
.results-run-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0 10px;
  margin-bottom: 4px;
  border-top: 1px solid rgba(31,42,46,0.08);
  border-bottom: 1px solid rgba(31,42,46,0.08);
}
.results-run-header[hidden] {
  display: none !important;
}
.run-object-shell {
  border-top: 1px solid rgba(31,42,46,0.08);
  border-bottom: 1px solid rgba(31,42,46,0.08);
  display: grid;
  gap: 8px;
  margin: 8px 0 6px;
  padding: 9px 0 10px;
}
.run-object-shell[hidden] {
  display: none !important;
}
.run-object-head {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.run-object-kicker,
.run-object-authority {
  color: rgba(75, 93, 100, 0.72);
  font-size: 9px;
  font-weight: 760;
}
.run-object-title {
  color: #17262B;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.run-object-meta,
.run-object-boundary {
  color: rgba(75, 93, 100, 0.78);
  font-size: 9.8px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.run-object-grid,
.run-object-refs,
.run-object-evidence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}
.run-object-field,
.run-object-refs span,
.run-object-evidence {
  background: rgba(248, 250, 249, 0.78);
  border: 1px solid rgba(31,42,46,0.08);
  border-radius: 6px;
  color: rgba(55, 72, 79, 0.86);
  display: inline-flex;
  gap: 5px;
  min-width: 0;
  padding: 4px 6px;
  font-size: 9.6px;
  line-height: 1.25;
  max-width: 100%;
}
.run-object-field strong,
.run-object-refs strong,
.run-object-evidence strong {
  color: #17262B;
  font-weight: 720;
}
.run-object-field span {
  overflow-wrap: anywhere;
}
.run-object-evidence-present {
  border-color: rgba(36, 112, 78, 0.18);
}
.run-object-evidence-unavailable {
  color: rgba(75, 93, 100, 0.68);
}
.results-run-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.results-run-title {
  color: #17262B;
  font-size: 11px;
  font-weight: 680;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.results-run-meta {
  color: rgba(75, 93, 100, 0.78);
  font-size: 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.sheet-warnings-summary {
  padding: 8px 0;
  margin: 0 0 4px;
  border-bottom: 1px solid rgba(31,42,46,0.08);
}
.sheet-warnings-summary[hidden] {
  display: none !important;
}
.sheet-warnings-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.sheet-warnings-title {
  color: #17262B;
  font-size: 10.5px;
  font-weight: 680;
}
.sheet-warnings-message {
  color: rgba(75, 93, 100, 0.78);
  font-size: 10px;
  line-height: 1.35;
}
.sheet-warnings-toggle {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  cursor: pointer;
  font-family: var(--font);
  font-size: 10px;
  padding: 0;
}
.sheet-warnings-detail {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}
.sheet-warnings-detail[hidden] {
  display: none !important;
}
.sheet-warning-row {
  border-top: 1px solid rgba(31,42,46,0.08);
  padding-top: 7px;
}
.sheet-warning-title {
  color: #17262B;
  font-size: 10.5px;
  font-weight: 680;
}
.sheet-warning-location,
.sheet-warning-message,
.sheet-warning-empty {
  color: rgba(55, 72, 79, 0.82);
  font-size: 10px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.sheet-warning-location {
  color: rgba(75, 93, 100, 0.72);
}
.results-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid rgba(31,42,46,0.08);
  font-size: 10px;
}
.results-row:first-child {
  border-top: none;
}
.results-output {
  color: rgba(55, 72, 79, 0.86);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.results-value {
  color: #111C20;
  font-size: 11.5px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.results-empty {
  color: var(--fg-dim);
  font-size: 11.5px;
  line-height: 1.45;
  padding: 10px 0 2px;
}
.results-failure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(31,42,46,0.08);
  font-size: 11px;
}
.results-failure-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: rgba(55, 72, 79, 0.82);
}
.results-failure-copy strong {
  color: #17262B;
  font-size: 11px;
}
.results-failure-copy span {
  overflow-wrap: anywhere;
}

.run-review-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.results-history-toggle {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-family: var(--font);
  font-size: 10.5px;
  cursor: pointer;
}

.run-review-actions .results-history-toggle {
  margin-top: 0;
}
.run-review-actions .review-primary {
  font-weight: 680;
}

.review-handoff-cue {
  border-top: 1px solid rgba(31,42,46,0.08);
  color: rgba(75, 93, 100, 0.74);
  font-size: 9.8px;
  line-height: 1.35;
  margin-top: 8px;
  padding-top: 7px;
  max-width: 46rem;
}

.results-history-toggle:hover {
  color: var(--accent);
}

.run-compare-panel {
  margin-top: 10px;
  padding: 8px 0 10px;
  border-top: 1px solid rgba(31,42,46,0.08);
  border-bottom: 1px solid rgba(31,42,46,0.08);
}

.run-compare-panel[hidden] {
  display: none !important;
}

.run-compare-title {
  color: #17262B;
  font-size: 10.8px;
  font-weight: 680;
  margin-bottom: 3px;
}

.run-compare-meta,
.run-compare-more,
.run-compare-summary {
  color: rgba(75, 93, 100, 0.74);
  font-size: 9.8px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.run-compare-summary {
  color: rgba(55, 72, 79, 0.88);
  margin-top: 5px;
}

.run-compare-group {
  margin-top: 8px;
}

.run-compare-group summary {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #17262B;
  font-size: 9.8px;
  font-weight: 640;
  cursor: default;
}

.run-compare-copy-intent {
  color: rgba(75, 93, 100, 0.66);
  font-size: 9.4px;
  line-height: 1.35;
  margin-top: 3px;
}

.run-compare-grid {
  display: grid;
  grid-template-columns: minmax(82px, 1fr) repeat(2, minmax(54px, auto));
  gap: 5px 8px;
  margin-top: 8px;
  color: rgba(55, 72, 79, 0.82);
  font-size: 9.8px;
}

.run-compare-grid > div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-compare-grid > div:nth-child(3n+2),
.run-compare-grid > div:nth-child(3n+3) {
  color: #17262B;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.run-compare-label {
  color: rgba(55, 72, 79, 0.82);
}

.run-compare-method {
  font-weight: 680;
  color: #17262B !important;
}

.run-compare-memory {
  color: #16666E !important;
}

.run-compare-ai {
  color: #214F5B !important;
}

.run-compare-output {
  background: rgba(70, 160, 133, 0.08);
  border-radius: 4px;
  padding: 1px 3px;
}

.run-compare-technical {
  color: rgba(75, 93, 100, 0.68) !important;
}

.run-compare-empty {
  grid-column: 1 / -1;
  color: var(--fg-dim);
  text-align: left !important;
}

.run-compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.run-compare-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-family: var(--font);
  font-size: 9.8px;
  cursor: pointer;
}

.run-compare-actions button:hover {
  color: var(--accent);
}

.run-history-list {
  margin-top: 10px;
  padding: 2px 0 0;
  border-top: 1px solid rgba(31,42,46,0.08);
  border-bottom: 1px solid rgba(31,42,46,0.08);
}

.run-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(31,42,46,0.06);
}

.run-history-row:last-child {
  border-bottom: none;
}

.run-history-main,
.run-history-audit {
  border: 0;
  background: transparent;
  font-family: var(--font);
  cursor: pointer;
}

.run-history-main {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  text-align: left;
  color: var(--fg-dim);
  font-size: 10px;
}

.run-history-main .run-history-title {
  color: #17262B;
  font-size: 10.5px;
  font-weight: 660;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-history-main .run-history-meta {
  color: rgba(75, 93, 100, 0.74);
  font-size: 9.8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-history-main strong {
  color: var(--fg);
  font-size: 10.5px;
  font-weight: 590;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-history-main .run-history-action {
  color: rgba(22, 102, 110, 0.82);
  font-size: 9.8px;
  font-weight: 620;
}

.run-history-audit {
  padding: 0;
  color: var(--accent-dark);
  font-size: 10px;
  white-space: nowrap;
}

.run-history-main:hover strong,
.run-history-main:hover .run-history-action,
.run-history-audit:hover {
  color: var(--accent);
}

.model-memory-toggle {
  align-self: flex-start;
  margin: 2px 0 8px;
}

.model-memory-panel {
  border: 1px solid rgba(31,42,46,0.10);
  border-radius: 8px;
  background: rgba(252, 253, 253, 0.98);
  padding: 10px 10px 11px;
  margin: 0 0 10px;
  display: grid;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(24, 31, 38, 0.08);
}

.model-memory-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.model-memory-title {
  color: #17262B;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.model-memory-subtitle,
.model-memory-summary,
.model-memory-empty {
  color: var(--fg-dim);
  font-size: 9.8px;
  line-height: 1.35;
}

.model-memory-set-line {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.model-memory-set-line span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-memory-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 5px 0 3px;
}

.model-memory-counts span,
.model-memory-badge {
  border: 1px solid rgba(31,42,46,0.08);
  border-radius: 999px;
  padding: 1px 5px;
  background: rgba(255,255,255,0.76);
  color: rgba(55, 72, 79, 0.82);
  font-size: 9px;
  line-height: 1.25;
}

.model-memory-tabs {
  display: flex;
  gap: 4px;
}

.model-memory-tab {
  border: 1px solid rgba(31,42,46,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.76);
  color: rgba(55, 72, 79, 0.82);
  cursor: pointer;
  font-family: var(--font);
  font-size: 9.5px;
  padding: 3px 7px;
}

.model-memory-tab.active {
  background: rgba(15, 143, 152, 0.08);
  border-color: rgba(15, 143, 152, 0.22);
  color: #16666E;
}

.model-memory-close {
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font-family: var(--font);
  font-size: 9.8px;
  cursor: pointer;
  padding: 0;
}

.model-memory-list {
  display: grid;
  gap: 6px;
}

.model-memory-timeline {
  display: grid;
  gap: 6px;
}

.model-memory-list h4,
.model-memory-timeline h4 {
  margin: 0;
  color: rgba(55, 72, 79, 0.82);
  font-size: 10px;
  font-weight: 680;
}

.model-memory-card {
  display: grid;
  gap: 4px;
  width: 100%;
  text-align: left;
  border: 1px solid rgba(31,42,46,0.10);
  border-left: 3px solid rgba(15, 143, 152, 0.50);
  border-radius: 6px;
  background: rgba(248, 249, 250, 0.86);
  padding: 7px 8px;
  color: var(--fg);
  font-family: var(--font);
}

.model-memory-card-draft {
  border-left-color: rgba(183, 121, 31, 0.62);
}

.model-memory-card-retired {
  border-left-color: rgba(116, 126, 132, 0.48);
  opacity: 0.82;
}

.model-memory-card-superseded {
  border-left-color: rgba(116, 126, 132, 0.40);
  opacity: 0.78;
}

.model-memory-card:hover {
  border-color: rgba(15, 143, 152, 0.24);
  background: rgba(255, 255, 255, 0.94);
}

.model-memory-card-main {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: var(--font);
  cursor: pointer;
}

.model-memory-card-title {
  font-size: 10.5px;
  font-weight: 650;
  color: #17262B;
}

.model-memory-card-meta {
  color: var(--fg-dim);
  font-size: 9.6px;
  line-height: 1.35;
}

.model-memory-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.model-memory-badge-active,
.model-memory-badge-approved,
.model-memory-mode-cited {
  color: #16666E;
  border-color: rgba(15, 143, 152, 0.22);
  background: rgba(15, 143, 152, 0.07);
}

.model-memory-badge-draft {
  color: #8B5E16;
  border-color: rgba(183, 121, 31, 0.22);
  background: rgba(183, 121, 31, 0.08);
}

.model-memory-badge-retired {
  color: rgba(55, 72, 79, 0.72);
  border-color: rgba(116, 126, 132, 0.18);
  background: rgba(116, 126, 132, 0.07);
}

.model-memory-badge-superseded {
  color: rgba(55, 72, 79, 0.72);
  border-color: rgba(116, 126, 132, 0.18);
  background: rgba(116, 126, 132, 0.07);
}

.model-memory-mode-constraint {
  color: #7A3E31;
  border-color: rgba(174, 91, 70, 0.24);
  background: rgba(174, 91, 70, 0.07);
}

.model-memory-mode-advisory {
  color: rgba(55, 72, 79, 0.82);
}

.model-memory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.model-memory-tags span {
  border: 1px solid rgba(31,42,46,0.08);
  border-radius: 999px;
  padding: 1px 5px;
  color: rgba(55, 72, 79, 0.78);
  background: rgba(255,255,255,0.72);
  font-size: 9px;
}

.model-memory-controls,
.model-memory-actions,
.model-memory-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.model-memory-controls {
  margin-top: 6px;
}

.model-memory-controls button,
.model-memory-actions button,
.model-memory-form-actions button {
  border: 1px solid rgba(31,42,46,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: #16666E;
  cursor: pointer;
  font-family: var(--font);
  font-size: 9.5px;
  line-height: 1.25;
  padding: 3px 7px;
}

.model-memory-actions button {
  color: rgba(55, 72, 79, 0.86);
  font-size: 9px;
  padding: 2px 6px;
}

.model-memory-controls button:hover,
.model-memory-actions button:hover,
.model-memory-form-actions button:hover {
  border-color: rgba(15, 143, 152, 0.24);
  background: rgba(15, 143, 152, 0.07);
}

.model-memory-detail {
  border-top: 1px solid rgba(31,42,46,0.08);
  padding-top: 8px;
}

.model-memory-detail-title {
  color: #17262B;
  font-size: 11px;
  font-weight: 680;
  margin-bottom: 5px;
}

.model-memory-detail-body {
  color: var(--fg);
  font-size: 10px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.model-memory-field {
  display: grid;
  gap: 3px;
  color: rgba(55, 72, 79, 0.86);
  font-size: 9.6px;
  line-height: 1.3;
  margin: 6px 0;
}

.model-memory-field input,
.model-memory-field select,
.model-memory-field textarea {
  width: 100%;
  border: 1px solid rgba(31,42,46,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.92);
  color: var(--fg);
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.35;
  padding: 6px 7px;
}

.model-memory-field textarea {
  min-height: 72px;
  resize: vertical;
}

.model-memory-form-actions {
  margin-top: 8px;
}

.model-memory-event {
  border: 1px solid rgba(31,42,46,0.10);
  border-left: 3px solid rgba(15, 143, 152, 0.36);
  border-radius: 6px;
  background: rgba(248, 249, 250, 0.86);
  padding: 7px 8px;
}

.model-memory-event-badge {
  color: #16666E;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.model-memory-event-title {
  color: #17262B;
  font-size: 10.5px;
  font-weight: 650;
  margin-top: 3px;
}

.model-memory-event-summary,
.model-memory-event-meta {
  color: var(--fg-dim);
  font-size: 9.6px;
  line-height: 1.35;
  margin-top: 3px;
}

.model-memory-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: #16666E;
  cursor: pointer;
  font-family: var(--font);
  font-size: 9.6px;
  line-height: 1.35;
  margin-top: 6px;
  padding: 0;
  text-align: left;
}

.model-memory-link:hover {
  text-decoration: underline;
}

.golden-path-walkthrough {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin: 0 0 8px;
  padding: 8px 0 0;
}

.golden-path-walkthrough-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.golden-path-walkthrough-title {
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
}

.golden-path-walkthrough-subtitle,
.golden-path-walkthrough-note {
  color: var(--fg-dim);
  font-size: 9.4px;
  line-height: 1.35;
}

.golden-path-walkthrough-note {
  white-space: nowrap;
}

.golden-path-walkthrough-list {
  display: grid;
  gap: 3px 12px;
  grid-template-columns: 1fr;
  list-style-position: inside;
  margin: 8px 0 0;
  padding: 0;
}

.golden-path-walkthrough-list li {
  color: var(--fg-dim);
  font-size: 9.5px;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.branch-lineage-panel {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin: 0 0 8px;
  padding: 8px 0 0;
}

.branch-lineage-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.branch-lineage-title {
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
}

.branch-lineage-subtitle,
.branch-lineage-boundary,
.branch-lineage-empty,
.branch-lineage-card-copy {
  color: var(--fg-dim);
  font-size: 9.5px;
  line-height: 1.35;
}

.branch-lineage-badge,
.branch-lineage-tags span {
  border: 0;
  color: var(--fg-dim);
  font-size: 9px;
  font-weight: 560;
  padding: 0;
  white-space: nowrap;
}

.branch-lineage-boundary {
  margin-top: 5px;
}

.branch-lineage-create {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin-top: 7px;
  padding-top: 6px;
}

.branch-lineage-create summary {
  color: #16666E;
  cursor: pointer;
  font-size: 9.5px;
  font-weight: 650;
}

.branch-lineage-create-note,
.branch-lineage-form-meta,
.branch-lineage-create-status,
.branch-lineage-detail-note,
.branch-lineage-detail-empty {
  color: var(--fg-dim);
  font-size: 9.2px;
  line-height: 1.35;
  margin-top: 5px;
}

.branch-lineage-form {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 7px;
}

.branch-lineage-form label {
  color: var(--fg-muted);
  display: grid;
  font-size: 9px;
  gap: 3px;
}

.branch-lineage-form input,
.branch-lineage-form select {
  background: rgba(255,255,255,0.86);
  border: 1px solid rgba(31,42,46,0.13);
  border-radius: 5px;
  color: var(--fg);
  font-size: 10px;
  min-width: 0;
  padding: 5px 6px;
}

.branch-lineage-form .branch-lineage-check {
  align-items: center;
  display: flex;
  gap: 5px;
}

.branch-lineage-create-btn,
.branch-lineage-review-btn {
  background: rgba(15, 143, 152, 0.08);
  border: 1px solid rgba(15, 143, 152, 0.22);
  border-radius: 5px;
  color: #16666E;
  cursor: pointer;
  font-size: 9.5px;
  font-weight: 650;
  margin-top: 6px;
  padding: 4px 7px;
}

.branch-lineage-review-btn {
  background: rgba(255,255,255,0.72);
}

.branch-lineage-list {
  display: grid;
  gap: 6px;
  margin-top: 7px;
}

.branch-lineage-card {
  border-top: 1px solid rgba(31,42,46,0.08);
  padding-top: 6px;
}

.branch-lineage-card-title {
  color: var(--fg);
  font-size: 10.5px;
  font-weight: 650;
}

.branch-lineage-tags,
.branch-lineage-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.branch-lineage-fields span {
  color: var(--fg-dim);
  font-size: 9.2px;
}

.branch-lineage-fields strong {
  color: var(--fg-muted);
  font-weight: 650;
}

.branch-lineage-detail {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin-top: 7px;
  padding-top: 6px;
}

.branch-lineage-detail-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.branch-lineage-detail-title {
  color: var(--fg);
  font-size: 10.5px;
  font-weight: 650;
}

.branch-lineage-detail-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

.branch-lineage-detail-row {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.branch-lineage-detail-row strong {
  color: var(--fg-muted);
  font-size: 9px;
  font-weight: 650;
}

.branch-lineage-detail-row span {
  color: var(--fg-dim);
  font-size: 9.2px;
  overflow-wrap: anywhere;
}

.lineage-strip-card {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin: 0 0 8px;
  padding: 8px 0 0;
}

.lineage-strip-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.lineage-strip-title {
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
}

.lineage-strip-subtitle,
.lineage-strip-note,
.lineage-step-label,
.lineage-review-row {
  color: var(--fg-dim);
  font-size: 9.4px;
  line-height: 1.35;
}

.lineage-strip-note {
  white-space: nowrap;
}

.lineage-strip-steps {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 8px;
}

.lineage-step {
  min-width: 0;
}

.lineage-step-value {
  color: var(--fg);
  font-size: 10px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineage-review-row {
  border-top: 1px solid rgba(31,42,46,0.08);
  display: grid;
  gap: 4px 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 8px;
  padding-top: 6px;
}

.lineage-review-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineage-review-row strong {
  color: var(--fg-muted);
  font-weight: 650;
}

.lineage-disclosure {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin-top: 7px;
  padding-top: 6px;
}

.lineage-disclosure summary {
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 9.5px;
  font-weight: 650;
  list-style-position: inside;
}

.lineage-disclosure-body {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.lineage-disclosure-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(88px, 0.42fr) minmax(0, 1fr);
}

.lineage-disclosure-row span {
  color: var(--fg-dim);
  font-size: 9.3px;
}

.lineage-disclosure-row strong {
  color: var(--fg);
  font-size: 9.7px;
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-context-card {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin: 0 0 12px;
  padding: 8px 0 0;
}

.review-context-head {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.review-context-title {
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
}

.review-context-subtitle,
.review-context-note,
.review-context-empty {
  color: var(--fg-dim);
  font-size: 9.4px;
  line-height: 1.35;
}

.review-context-note {
  white-space: nowrap;
}

.review-context-list {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}

.review-context-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(62px, 0.32fr) minmax(0, 1fr);
}

.review-context-row span {
  color: var(--fg-dim);
  font-size: 9.3px;
}

.review-context-row strong {
  color: var(--fg);
  font-size: 9.7px;
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-state-strip {
  align-items: start;
  border: 1px solid rgba(31,42,46,0.10);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.70);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 0;
  padding: 6px 8px;
}

.workflow-state-title {
  color: var(--fg);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.model-workflow-state-summary {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.model-workflow-state-field {
  border: 1px solid rgba(31,42,46,0.08);
  border-radius: 5px;
  background: rgba(248, 249, 250, 0.82);
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 5px 6px;
}

.model-workflow-state-field strong {
  color: var(--fg-dim);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.model-workflow-state-field span {
  color: var(--fg);
  font-size: 10px;
  font-weight: 650;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-workflow-action-field {
  background: rgba(255, 255, 255, 0.90);
  border-color: rgba(49, 79, 115, 0.22);
}

.model-workflow-next-action-button {
  align-items: center;
  background: rgba(49, 79, 115, 0.10);
  border: 1px solid rgba(49, 79, 115, 0.38);
  border-radius: 4px;
  color: rgba(31, 42, 46, 0.96);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 760;
  justify-content: center;
  line-height: 1.2;
  min-height: 24px;
  min-width: 0;
  overflow: hidden;
  padding: 4px 8px;
  text-align: center;
  text-overflow: ellipsis;
  transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
  white-space: nowrap;
  width: 100%;
}

.model-workflow-next-action-button:hover:not(:disabled) {
  background: rgba(49, 79, 115, 0.16);
  border-color: rgba(49, 79, 115, 0.54);
  color: rgba(20, 33, 38, 1);
}

.model-workflow-next-action-button:active:not(:disabled) {
  transform: translateY(1px);
}

.model-workflow-next-action-button:disabled {
  background: rgba(92, 108, 114, 0.10);
  border-color: rgba(31, 42, 46, 0.12);
  color: rgba(80, 96, 103, 0.60);
  cursor: default;
}

.model-workflow-next-action-button[aria-busy="true"] {
  background: rgba(49, 79, 115, 0.18);
  border-color: rgba(49, 79, 115, 0.44);
}

.run-lifecycle-summary {
  align-items: center;
  color: var(--fg-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 9.8px;
  gap: 4px 8px;
  line-height: 1.25;
  min-width: 0;
  width: 100%;
}

.run-lifecycle-summary[hidden] {
  display: none !important;
}

.run-lifecycle-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-readiness-items {
  display: grid;
  gap: 3px;
  max-height: 54px;
  min-height: 16px;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}

.run-readiness-item {
  color: var(--fg-dim);
  font-size: 9.5px;
  line-height: 1.35;
  white-space: nowrap;
}

.run-readiness-item strong {
  color: var(--fg-muted);
  font-weight: 650;
}

.run-console-line {
  align-items: start;
  color: var(--fg-dim);
  display: grid;
  font-size: 11px;
  gap: 5px;
  grid-template-columns: 7px minmax(48px, auto) minmax(0, 1fr);
  line-height: 14px;
  min-height: 14px;
  min-width: 0;
}

.run-console-time {
  color: var(--fg-muted);
  font-weight: 500;
  min-width: 0;
  white-space: nowrap;
}

.run-console-severity-dot {
  align-self: center;
  background: rgba(75, 102, 118, 0.55);
  border-radius: 50%;
  display: inline-block;
  height: 5px;
  margin-top: 1px;
  width: 5px;
}

.run-console-line[data-readiness-severity="success"] .run-console-severity-dot {
  background: rgba(31, 125, 103, 0.72);
}

.run-console-line[data-readiness-severity="warning"] .run-console-severity-dot {
  background: rgba(178, 58, 58, 0.78);
}

.run-console-line[data-readiness-severity="error"] .run-console-severity-dot {
  background: rgba(178, 58, 58, 0.95);
}

.run-console-message {
  color: var(--fg);
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.workflow-state-mark {
  color: var(--fg-muted);
  margin-left: 2px;
}

@media (max-width: 920px) {
  .model-timeline {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .model-timeline-anchors {
    gap: 8px;
  }

  .model-timeline-anchor {
    flex-basis: 58px;
  }

  .model-through-time-bundle-sections {
    grid-template-columns: 1fr;
  }

  .lineage-strip-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lineage-disclosure-row,
  .review-context-row {
    grid-template-columns: 1fr;
  }

  .golden-path-walkthrough-list {
    grid-template-columns: 1fr;
  }

  .workflow-state-strip {
    align-items: start;
  }

  .model-workflow-state-summary {
    grid-template-columns: 1fr;
  }

  .run-readiness-items {
    max-height: 70px;
  }

  .llm-review-summary-grid {
    grid-template-columns: 1fr;
  }
}

.results-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
  font-size: 10px;
}
.results-head,
.results-scenario {
  color: var(--fg-muted);
  border-bottom: 1px solid rgba(31,42,46,0.08);
  padding: 5px 6px 5px 0;
  white-space: nowrap;
}
.results-head {
  color: var(--fg-dim);
  font-weight: 560;
}
.results-scenario {
  color: var(--fg);
}
.results-sub {
  color: var(--fg-dim);
  font-size: 9px;
  font-weight: 400;
}
.results-table .results-value {
  border-bottom: 1px solid rgba(31,42,46,0.11);
  padding: 5px 0 5px 6px;
}
.results-table-aggregate {
  min-width: 680px;
}
.results-aggregate-entity {
  font-weight: 560;
}
.results-row-action {
  display: flex;
  align-items: center;
}
.results-row-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.results-row-link:hover {
  color: var(--fg);
}

.audit-link {
  margin-top: 8px;
  width: 100%;
}

#audit-overlay {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 30, 0.56);
}

#audit-overlay.visible:not([hidden]) {
  display: flex;
}

#audit-overlay.visible #audit-modal {
  animation: modalIn 150ms ease-out;
}

#llm-formula-overlay {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 30, 0.28);
}

#llm-formula-overlay.visible:not([hidden]) {
  display: flex;
}

#llm-formula-overlay.visible #llm-formula-modal {
  animation: modalIn 150ms ease-out;
}

#llm-method-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 30, 0.28);
}

#llm-method-overlay.visible:not([hidden]) {
  display: flex;
}

#llm-method-overlay.visible #llm-method-modal {
  animation: modalIn 150ms ease-out;
}

#new-model-overlay {
  position: fixed;
  inset: 0;
  z-index: 59;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 30, 0.28);
}

#new-model-overlay.visible:not([hidden]) {
  display: flex;
}

#schedule-run-overlay {
  position: fixed;
  inset: 0;
  z-index: 59;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 30, 0.28);
}

#schedule-run-overlay.visible:not([hidden]) {
  display: flex;
}

#schedule-run-overlay.visible #schedule-run-modal {
  animation: modalIn 150ms ease-out;
}

#product-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 61;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 24, 30, 0.30);
}

#product-guide-overlay.visible:not([hidden]) {
  display: flex;
}

#product-guide-overlay.visible #product-guide-modal {
  animation: modalIn 150ms ease-out;
}

#product-guide-modal {
  width: min(760px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 14px;
  background: rgba(252, 253, 253, 0.98);
  box-shadow: 0 22px 70px rgba(24, 31, 38, 0.22);
  padding: 16px;
}

.product-guide-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.08);
  padding-bottom: 12px;
}

.product-guide-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 680;
  color: var(--fg);
}

.product-guide-header p,
.product-guide-card p,
.product-guide-flow {
  color: var(--fg-dim);
  font-size: 11px;
  line-height: 1.45;
}

.product-guide-header p {
  margin-top: 4px;
}

.product-guide-loop {
  margin-top: 12px;
  border: 1px solid rgba(15, 143, 152, 0.18);
  border-radius: 9px;
  background: rgba(15, 143, 152, 0.055);
  color: #16666E;
  font-size: 12px;
  font-weight: 680;
  line-height: 1.45;
  padding: 9px 10px;
}

.product-guide-flow {
  margin-top: 5px;
  padding-left: 2px;
}

.product-guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.product-guide-card {
  border: 1px solid rgba(31, 42, 46, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
  padding: 10px;
}

.product-guide-card h3 {
  margin: 0 0 5px;
  color: var(--fg);
  font-size: 11px;
  font-weight: 680;
}

@media (max-width: 820px) {
  .product-guide-grid {
    grid-template-columns: 1fr;
  }

  #product-guide-modal {
    width: calc(100vw - 22px);
    max-height: calc(100vh - 22px);
  }

  #llm-method-modal {
    width: calc(100vw - 22px);
    height: calc(100vh - 22px);
  }
}

#new-model-overlay.visible #new-model-modal {
  animation: modalIn 150ms ease-out;
}

#new-model-modal,
#schedule-run-modal {
  width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 14px;
  background: rgba(252, 253, 253, 0.97);
  box-shadow: 0 22px 70px rgba(24, 31, 38, 0.22);
  padding: 18px;
}

#new-model-modal h2,
#schedule-run-modal h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 650;
}

#new-model-modal p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 12px;
  line-height: 1.5;
}

.schedule-copy {
  margin: 8px 0 0;
  color: var(--fg-muted);
  font-size: 12px;
  line-height: 1.45;
}

.schedule-adjustments {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
}

.schedule-adjustments label {
  display: grid;
  gap: 4px;
  flex: 1 1 0;
  color: var(--fg-muted);
  font-size: 10px;
  font-weight: 500;
}

.schedule-adjustments input,
.schedule-adjustments select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--fg);
  font-size: 11px;
  padding: 6px 7px;
}

.schedule-summary {
  margin-top: 6px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.08);
  padding: 8px 0 12px;
  color: var(--fg);
  font-size: 16px;
  line-height: 1.35;
  font-weight: 620;
}

#schedule-scenarios {
  min-height: 66px;
}

.scheduled-list {
  margin-top: 12px;
  max-height: 120px;
  overflow: auto;
  color: var(--fg-muted);
  font-size: 11px;
}

.scheduled-list-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
}

.new-model-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.btn-primary {
  border-color: rgba(52, 139, 180, 0.42);
  background: linear-gradient(135deg, rgba(72, 148, 190, 0.92), rgba(70, 160, 133, 0.9));
  color: #fff;
  box-shadow: 0 8px 18px rgba(48, 122, 151, 0.16);
}

#llm-formula-modal {
  width: min(620px, calc(100vw - 36px));
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  scroll-padding-bottom: 60px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 14px;
  background: rgba(252, 253, 253, 0.97);
  box-shadow: 0 22px 70px rgba(24, 31, 38, 0.22);
  padding: 12px;
}

#llm-method-modal {
  display: flex;
  flex-direction: column;
  width: 86vw;
  height: 86vh;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 14px;
  background: rgba(252, 253, 253, 0.97);
  box-shadow: 0 22px 70px rgba(24, 31, 38, 0.22);
  padding: 12px;
}

.llm-modal-header,
#llm-formula-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.llm-modal-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
}

.llm-formula-subtitle,
.llm-method-subtitle {
  margin: 3px 0 0;
  color: var(--fg-dim);
  font-size: 11px;
  line-height: 1.35;
}

.llm-field {
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.llm-field label {
  color: var(--fg-dim);
  font-size: 10px;
}

#llm-formula-name,
#llm-output-type,
.llm-input-name,
.llm-input-ref,
#llm-definition-text,
.llm-control {
  width: 100%;
  box-sizing: border-box;
  min-height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-input);
  color: var(--fg);
  font-family: var(--font);
  font-size: 11px;
  line-height: 1.3;
  padding: 6px 8px;
}

#llm-output-type,
#llm-method-select {
  height: 34px;
  line-height: normal;
  padding: 0 32px 0 9px;
}

#llm-definition-text {
  min-height: 92px;
  resize: vertical;
}

#llm-method-markdown {
  min-height: 104px;
  line-height: 1.4;
  resize: vertical;
}

#llm-method-modal .llm-method-editor {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

#llm-method-modal .llm-method-document-field {
  flex: 1 1 auto;
  min-height: 0;
}

#llm-method-modal #llm-method-markdown {
  min-height: 360px;
  height: 100%;
  resize: none;
}

.llm-memory-section {
  border: 1px solid rgba(125, 169, 255, 0.18);
  border-radius: 8px;
  background: rgba(125, 169, 255, 0.045);
  padding: 8px;
}

.llm-memory-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.llm-memory-count {
  color: var(--fg-dim);
  font-size: 10px;
}

.llm-memory-list {
  display: grid;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
  margin-top: 7px;
  padding-right: 2px;
}

.llm-memory-row {
  border-left: 2px solid rgba(125, 169, 255, 0.42);
  padding: 5px 0 5px 7px;
}

.llm-memory-title {
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.llm-memory-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.llm-memory-badge {
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-dim);
  font-size: 9px;
  line-height: 1;
  padding: 3px 6px;
  text-transform: uppercase;
}

.llm-memory-mode-cited,
.llm-memory-mode-constraint {
  border-color: rgba(125, 169, 255, 0.38);
  color: var(--fg);
}

.llm-memory-used-by,
.llm-memory-empty {
  color: var(--fg-dim);
  font-size: 10px;
  line-height: 1.35;
  margin-top: 4px;
}

.llm-memory-show {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  margin-top: 6px;
  padding: 4px 7px;
}

.llm-memory-show:hover {
  border-color: rgba(125, 169, 255, 0.45);
}

.llm-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 6px;
  margin-bottom: 5px;
}

.llm-input-name {
  color: var(--fg);
  font-weight: 540;
}

.llm-input-ref {
  color: var(--fg-dim);
}

.llm-execution-hint {
  margin-top: 8px;
  color: var(--fg-dim);
  font-size: 11px;
  line-height: 1.35;
}

.llm-review-summary {
  margin-top: 10px;
  border: 1px solid rgba(31, 42, 46, 0.08);
  border-radius: 8px;
  background: rgba(248, 250, 250, 0.82);
  padding: 8px;
}

.llm-review-summary-title {
  color: var(--fg);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.llm-review-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin-top: 7px;
}

.llm-review-summary-grid div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.llm-review-summary-grid strong {
  color: var(--fg);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.2;
}

.llm-review-summary-grid span,
.llm-review-summary-note {
  color: var(--fg-dim);
  font-size: 10px;
  line-height: 1.35;
}

.llm-review-summary-note {
  margin-top: 7px;
}

.audit-inputs {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr) 84px;
  gap: 6px 10px;
  margin: 6px 0 10px;
  font-size: 11px;
}

.audit-input-head {
  color: var(--fg-muted);
  font-size: 10px;
  text-transform: uppercase;
}

#llm-preview-result {
  margin-top: 8px;
  color: var(--fg-muted);
  font-size: 11px;
}

#llm-formula-actions {
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 10px 0 0;
  padding: 9px 0 0;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
  background: rgba(252, 253, 253, 0.98);
  backdrop-filter: blur(10px);
}

#audit-modal {
  width: min(860px, calc(100vw - 40px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 14px;
  background: rgba(252, 253, 253, 0.995);
  color: rgba(31, 42, 46, 0.94);
  box-shadow: 0 22px 70px rgba(24, 31, 38, 0.26);
  opacity: 1;
}

#audit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

#audit-header h2 {
  margin: 0;
  color: inherit;
  font-size: 15px;
  font-weight: 650;
}

#audit-body {
  overflow: auto;
  padding: 14px 16px 18px;
  font-size: 12px;
  color: inherit;
  opacity: 1;
}

.audit-section {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}

.audit-section:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

.audit-section h3 {
  margin: 0 0 8px;
  color: inherit;
  font-size: 12px;
  font-weight: 650;
}

.audit-pm-summary-header {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(248, 249, 250, 0.9);
  padding: 12px;
  margin: 0 0 12px;
}

.audit-pm-summary-title {
  margin: 0 0 10px;
  color: inherit;
  font-size: 12px;
  font-weight: 650;
}

.audit-pm-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.audit-pm-summary-item {
  min-width: 0;
}

.audit-pm-summary-item strong {
  display: block;
  color: inherit;
  font-size: 10px;
  font-weight: 650;
}

.audit-pm-summary-item span {
  display: block;
  color: var(--fg-dim);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.audit-method-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin: 10px 0;
  background: rgba(248, 249, 250, 0.86);
}

.audit-memory-note {
  color: var(--fg-dim);
  font-size: 11px;
  line-height: 1.4;
  margin: 0 0 8px;
}

.audit-memory-card {
  border-left: 3px solid rgba(15, 143, 152, 0.42);
}

.audit-method-card h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 650;
}

.audit-kv {
  display: grid;
  grid-template-columns: minmax(130px, 180px) 1fr;
  gap: 6px 12px;
}

.audit-key {
  color: var(--fg-dim);
}

.audit-pre {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  background: rgba(238, 241, 244, 0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  margin: 6px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
}

#fx-label {
  padding: 0 8px;
  color: rgba(55, 72, 79, 0.74);
  font-size: 10px; font-style: italic;
  pointer-events: none;
}

#formula-bar {
  flex: 1;
  min-width: 0;
  background: transparent; color: #162126;
  border: none;
  padding: 0 8px;
  font-family: var(--mono); font-size: 12px;
  outline: none;
  height: 100%;
}
#formula-bar:focus {
  background: var(--bg-input);
  box-shadow: var(--ring);
}

/* ─── Main area ─── */

#main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 400px);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 10px;
  margin: 8px 12px 0;
  padding: 9px;
  position: relative;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(232, 247, 248, 0.92), rgba(250, 253, 253, 0.84)),
    rgba(255,255,255,0.64);
  box-shadow:
    0 18px 42px rgba(20, 90, 95, 0.10),
    inset 0 1px 0 rgba(255,255,255,0.76);
}
#main::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    rgba(15, 143, 152, 0.24) 0%,
    rgba(216, 243, 245, 0.18) 48%,
    rgba(11, 102, 112, 0.20) 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
#main.panel-collapsed {
  grid-template-columns: 1fr 36px;
}

body.timeline-focus-active #main {
  grid-template-columns: minmax(0, 1fr);
}

body.timeline-focus-active #side-panel {
  display: none;
}

body.timeline-focus-active .timeline-surface:not([hidden]) {
  justify-content: start;
  padding: 18px;
}

/* ─── Grid area ─── */

.primary-work-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.workspace-primary-surface {
  min-width: 0;
  min-height: 0;
}

.spreadsheet-surface {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.bank-financial-view-panel {
  flex: 0 0 auto;
  max-height: min(42vh, 390px);
  margin: 0 0 10px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.74);
  overflow: hidden;
}

.bank-financial-view-panel[hidden] {
  display: none !important;
}

.bank-model-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bank-model-security {
  color: var(--fg);
  font-size: 20px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.15;
}

.bank-model-type,
.bank-financial-view-heading {
  margin-top: 2px;
  color: rgba(49, 65, 72, 0.62);
  font-size: 11px;
  font-weight: 560;
}

.bank-model-state {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 8px;
  padding: 9px 0;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
  border-bottom: 1px solid rgba(31, 42, 46, 0.08);
}

.bank-model-state div {
  min-width: 0;
}

.bank-model-state dt {
  color: rgba(49, 65, 72, 0.50);
  font-size: 10px;
  font-weight: 560;
}

.bank-model-state dd {
  margin-top: 3px;
  color: var(--fg);
  font-size: 12px;
  font-weight: 590;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-import-status {
  min-height: 16px;
  color: rgba(49, 65, 72, 0.66);
  font-size: 11px;
}

.bank-financial-view-heading {
  margin: 5px 0 7px;
  color: var(--fg);
  font-size: 13px;
  font-weight: 680;
}

.bank-financial-view-body {
  min-height: 42px;
}

.bank-financial-view-scroll {
  max-height: 210px;
  overflow: auto;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
}

.bank-financial-view-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 11px;
}

.bank-financial-view-table th,
.bank-financial-view-table td {
  padding: 5px 8px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.07);
  text-align: right;
  white-space: nowrap;
}

.bank-financial-view-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.96);
  color: rgba(49, 65, 72, 0.58);
  font-weight: 650;
}

.bank-financial-view-table th:first-child,
.bank-financial-view-row-label {
  text-align: left;
}

.bank-financial-view-group th {
  padding-top: 9px;
  color: var(--fg);
  background: rgba(255, 255, 255, 0.58);
  font-weight: 700;
}

.bank-financial-value {
  font-variant-numeric: tabular-nums;
}

.bank-financial-value-empty {
  color: rgba(49, 65, 72, 0.38);
}

.bank-financial-view-empty {
  padding: 11px 0;
  color: rgba(49, 65, 72, 0.62);
  font-size: 12px;
}

.object-context-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font: 760 12px/1.2 var(--font);
}

.object-context-title span {
  color: rgba(67, 84, 91, 0.72);
  font: 650 10px/1.2 var(--font);
}

.object-context-subtitle {
  margin-top: 3px;
}

.object-context-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  font: 560 11px/1.32 var(--font);
}

.object-context-row span {
  color: rgba(67, 84, 91, 0.72);
}

.object-context-row em {
  color: rgba(24, 35, 39, 0.92);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-context-row.object-context-continue em {
  color: rgba(14, 85, 91, 0.94);
  font-weight: 650;
}

.explore-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.explore-title {
  color: rgba(24, 35, 39, 0.92);
  font: 760 14px/1.2 var(--font);
}

.explore-subtitle {
  margin-top: 2px;
  color: rgba(67, 84, 91, 0.74);
  font: 560 10px/1.35 var(--font);
}

.explore-thinking-loop {
  border: 1px solid rgba(15, 143, 152, 0.14);
  border-radius: 8px;
  background: rgba(216, 243, 245, 0.34);
  color: rgba(14, 85, 91, 0.94);
  font: 650 10px/1.35 var(--font);
  padding: 6px 8px;
}

.explore-close {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(31, 42, 46, 0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.64);
  color: rgba(67, 84, 91, 0.74);
  cursor: pointer;
}

.explore-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.explore-field span {
  color: rgba(67, 84, 91, 0.78);
  font: 650 10px/1.25 var(--font);
}

.explore-field textarea,
.explore-field input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(31, 42, 46, 0.13);
  border-radius: 8px;
  background: rgba(255,255,255,0.78);
  color: rgba(24, 35, 39, 0.9);
  font: 12px/1.4 var(--font);
  outline: none;
}

.explore-field textarea {
  min-height: 54px;
  resize: vertical;
  padding: 8px;
}

.explore-field input {
  height: 30px;
  padding: 0 8px;
}

.explore-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.explore-preview,
.explore-discard,
.explore-save {
  height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(31, 42, 46, 0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: rgba(24, 35, 39, 0.78);
  font: 650 10px var(--font);
  cursor: pointer;
}

.explore-preview {
  color: rgba(14, 85, 91, 0.94);
  border-color: rgba(15, 143, 152, 0.24);
  background: rgba(216, 243, 245, 0.54);
}

.explore-preview:disabled {
  cursor: wait;
  opacity: 0.72;
}

.explore-save {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  color: rgba(14, 85, 91, 0.94);
  border-color: rgba(15, 143, 152, 0.24);
  background: rgba(216, 243, 245, 0.54);
}

.explore-save:disabled {
  cursor: wait;
  opacity: 0.72;
}

.explore-save-message {
  display: block;
  margin-top: 4px;
  color: rgba(176, 47, 47, 0.88);
}

.explore-reasoning-continuity {
  display: grid;
  gap: 3px;
  margin-top: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(15, 143, 152, 0.16);
  border-radius: 8px;
  background: rgba(216, 243, 245, 0.34);
}

.explore-compiler-understanding {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(45, 113, 163, 0.16);
  border-radius: 8px;
  background: rgba(235, 244, 250, 0.62);
}

.explore-operation-projection {
  display: grid;
  gap: 4px;
  margin-bottom: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(15, 143, 152, 0.18);
  border-radius: 8px;
  background: rgba(216, 243, 245, 0.30);
}

.explore-operation-projection > strong {
  color: rgba(14, 85, 91, 0.96);
}

.explore-operation-row {
  display: grid;
  grid-template-columns: minmax(68px, 0.34fr) 1fr;
  gap: 7px;
  align-items: start;
}

.explore-operation-row > span {
  min-width: 0;
  color: rgba(67, 84, 91, 0.70);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.explore-operation-row > em {
  min-width: 0;
  color: rgba(24, 35, 39, 0.86);
  font-style: normal;
  overflow-wrap: anywhere;
}

.research-shell-action-response,
.research-shell-action-response .research-shell-action-section,
.research-shell-action-response .explore-operation-row {
  min-width: 0;
}

.research-shell-action-response .explore-operation-row {
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
}

.research-shell-action-response .explore-operation-row > span,
.research-shell-action-response .explore-operation-row > em {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.research-shell-action-response .research-shell-orientation-result {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.research-shell-orientation-title {
  min-width: 0;
  color: rgba(14, 85, 91, 0.98);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.research-shell-orientation-question {
  min-width: 0;
  color: rgba(67, 84, 91, 0.74);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.research-shell-orientation-assessment {
  min-width: 0;
  color: rgba(24, 35, 39, 0.94);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.research-shell-orientation-themes,
.research-shell-orientation-read-next {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.research-shell-orientation-theme,
.research-shell-orientation-read-next-row {
  min-width: 0;
  color: rgba(24, 35, 39, 0.86);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.research-shell-orientation-theme::before,
.research-shell-orientation-read-next-row::before {
  content: "- ";
  color: rgba(15, 143, 152, 0.70);
}

.research-shell-orientation-read-next-link {
  color: rgba(14, 85, 91, 0.96);
  text-decoration: underline;
  text-decoration-color: rgba(15, 143, 152, 0.42);
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.research-shell-orientation-read-next-link:hover {
  color: rgba(9, 105, 113, 0.98);
  text-decoration-color: rgba(15, 143, 152, 0.72);
}

.research-shell-orientation-read-next > strong {
  color: rgba(67, 84, 91, 0.74);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.research-shell-orientation-authority {
  min-width: 0;
  color: rgba(67, 84, 91, 0.64);
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.research-shell-action-diagnostic {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  min-width: 0;
  padding: 6px 0;
  border-top: 1px solid rgba(15, 143, 152, 0.12);
}

.research-shell-action-diagnostic:first-of-type {
  border-top: 0;
}

.research-shell-action-diagnostic-code {
  min-width: 0;
  color: rgba(45, 80, 89, 0.90);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.research-shell-action-diagnostic-message {
  min-width: 0;
  color: rgba(24, 35, 39, 0.86);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (min-width: 720px) {
  .research-shell-action-diagnostic {
    grid-template-columns: minmax(0, 0.44fr) minmax(0, 1fr);
    gap: 8px;
  }
}

.explore-understanding-row {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 5px;
  align-items: start;
}

.explore-understanding-row > strong {
  margin: 0;
  color: rgba(38, 116, 76, 0.88);
  line-height: 1.35;
}

.explore-understanding-row > span {
  min-width: 0;
}

.explore-clarification-answers {
  grid-column: 2;
  display: grid;
  gap: 3px;
  margin-top: 2px;
}

.explore-clarification-answers em {
  color: rgba(67, 84, 91, 0.72);
  font-style: normal;
}

.explore-clarification-answers button {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(45, 113, 163, 0.18);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(31, 42, 46, 0.84);
  font: 650 10.5px/1.25 var(--font);
  cursor: pointer;
}

.explore-clarification-answers button:hover {
  border-color: rgba(45, 113, 163, 0.34);
  background: rgba(255, 255, 255, 0.94);
}

.explore-clarification-answers button strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.explore-understanding-needs_clarification > strong,
.explore-understanding-not_understood > strong {
  color: rgba(176, 47, 47, 0.88);
}

.explore-preview-list {
  min-height: 28px;
  padding-top: 2px;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
}

.explore-empty,
.explore-preview-item {
  color: rgba(67, 84, 91, 0.76);
  font: 560 10.5px/1.35 var(--font);
}

.explore-preview-item {
  padding: 6px 0;
}

.explore-preview-item strong {
  display: block;
  margin-bottom: 2px;
  color: rgba(24, 35, 39, 0.84);
  font-weight: 700;
}

.explore-preview-item em {
  display: block;
  margin-top: 4px;
  color: rgba(14, 85, 91, 0.88);
  font-style: normal;
  font-weight: 650;
}

.explore-error {
  color: rgba(176, 47, 47, 0.88);
}

.document-surface {
  flex: 1;
  flex-direction: column;
  overflow: hidden;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.34), rgba(246,250,250,0.2));
}

.document-surface:not([hidden]) {
  display: flex;
}

.yap-workspace-surface {
  position: absolute;
  inset: 0;
  z-index: 4;
  flex-direction: column;
  overflow: hidden;
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.88), rgba(246,250,250,0.82)),
    rgba(248, 252, 252, 0.94);
}

.yap-workspace-surface:not([hidden]) {
  display: flex;
}

.yap-workspace-surface .yap-panel-shell {
  flex: 1 1 auto;
  min-height: 0;
}

.meeting-mode-surface {
  flex: 1;
  flex-direction: column;
  overflow: auto;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.54), rgba(246,250,250,0.30)),
    rgba(248, 252, 252, 0.94);
}

.meeting-mode-surface:not([hidden]) {
  display: flex;
}

.meeting-mode-shell {
  width: min(100%, 980px);
  margin: 0 auto;
}

.meeting-mode-header {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.meeting-mode-header-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.12);
}

.meeting-mode-kicker {
  margin-bottom: 4px;
  color: rgba(49, 79, 115, 0.72);
  font: 800 10px/1.2 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meeting-mode-header h2 {
  margin: 0;
  color: var(--fg);
  font: 760 18px/1.2 var(--font);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.meeting-mode-header p {
  margin: 4px 0 0;
  color: rgba(67, 84, 91, 0.74);
  font: 560 12px/1.35 var(--font);
}

.meeting-mode-execution-state {
  flex: 0 0 auto;
  max-width: 180px;
  padding: 6px 8px;
  border: 1px solid rgba(49, 79, 115, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(49, 79, 115, 0.92);
  font: 750 11px/1.25 var(--font);
  text-align: right;
}

.meeting-mode-execution-state[data-execution-allowed="false"] {
  border-color: rgba(176, 47, 47, 0.22);
  color: rgba(176, 47, 47, 0.92);
}

.meeting-mode-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.meeting-mode-header-section {
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
}

.meeting-mode-header-section h3 {
  margin: 0 0 7px;
  color: rgba(49, 79, 115, 0.78);
  font: 800 10px/1.2 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meeting-mode-header-rows {
  display: grid;
  gap: 5px;
}

.meeting-mode-header-row {
  display: grid;
  grid-template-columns: minmax(78px, 0.38fr) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
}

.meeting-mode-header-row span {
  color: rgba(67, 84, 91, 0.68);
  font: 700 10px/1.3 var(--font);
  overflow-wrap: anywhere;
}

.meeting-mode-header-row strong {
  min-width: 0;
  color: rgba(24, 35, 39, 0.92);
  font: 640 11px/1.3 var(--font);
  overflow-wrap: anywhere;
}

.meeting-mode-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
  max-width: 720px;
}

.meeting-mode-request-input {
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(31, 42, 46, 0.14);
  border-radius: 6px;
  background: rgba(255,255,255,0.68);
  color: rgba(24, 35, 39, 0.92);
  font: 620 12px var(--font);
}

.meeting-mode-request-submit {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 6px;
  background: rgba(255,255,255,0.62);
  color: rgba(49, 79, 115, 0.92);
  font: 760 11px var(--font);
  cursor: pointer;
}

.meeting-mode-request-submit:disabled,
.meeting-mode-request-input:disabled {
  cursor: default;
  opacity: 0.58;
}

.meeting-mode-request-status {
  grid-column: 1 / -1;
  min-height: 14px;
  color: rgba(67, 84, 91, 0.68);
  font: 620 11px/1.25 var(--font);
}

.meeting-mode-request-status[data-status="error"] {
  color: rgba(176, 47, 47, 0.88);
}

.meeting-mode-window {
  margin-top: 18px;
  min-width: 0;
}

.meeting-projection-empty {
  color: rgba(67, 84, 91, 0.58);
  font: 620 12px/1.4 var(--font);
}

.meeting-projection-note {
  display: grid;
  gap: 12px;
  min-width: 0;
  color: rgba(24, 35, 39, 0.92);
}

.meeting-projection-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: rgba(49, 79, 115, 0.78);
  font: 760 11px/1.3 var(--font);
  text-transform: uppercase;
}

.meeting-projection-status strong {
  color: rgba(176, 47, 47, 0.84);
  font: 700 11px/1.3 var(--font);
  text-transform: none;
}

.meeting-projection-question {
  margin: 0;
  max-width: 760px;
  color: rgba(24, 35, 39, 0.96);
  font: 700 17px/1.35 var(--font);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.meeting-projection-section {
  display: grid;
  gap: 6px;
  padding-top: 9px;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
}

.meeting-projection-section h3 {
  margin: 0;
  color: rgba(49, 79, 115, 0.72);
  font: 800 10px/1.2 var(--font);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meeting-projection-rows {
  display: grid;
  gap: 4px;
  max-width: 720px;
}

.meeting-projection-row {
  display: grid;
  grid-template-columns: minmax(86px, 0.24fr) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}

.meeting-projection-row span,
.meeting-projection-next-action span {
  color: rgba(67, 84, 91, 0.68);
  font: 700 10px/1.3 var(--font);
}

.meeting-projection-row strong,
.meeting-projection-next-action strong {
  min-width: 0;
  color: rgba(24, 35, 39, 0.9);
  font: 640 12px/1.35 var(--font);
  overflow-wrap: anywhere;
}

.meeting-projection-next-action {
  display: grid;
  grid-template-columns: minmax(86px, 0.24fr) minmax(0, 1fr);
  gap: 10px;
  max-width: 720px;
  padding-top: 9px;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
}

.document-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 0 0 10px;
}

.document-selector {
  flex: 0 0 220px;
  min-width: 180px;
  height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid rgba(31, 42, 46, 0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.76);
  color: rgba(24, 35, 39, 0.86);
  font: 650 12px var(--font);
  outline: none;
}

.document-title-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(31, 42, 46, 0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.76);
  color: rgba(24, 35, 39, 0.9);
  font: 650 14px var(--font);
  outline: none;
}

.document-title-input:focus,
.document-selector:focus,
.document-data-insert:focus,
.document-ai-insert:focus,
.document-body:focus {
  border-color: rgba(15, 143, 152, 0.35);
  box-shadow: 0 0 0 2px rgba(15, 143, 152, 0.08);
}

.document-save-status,
.document-render-status {
  flex: 0 0 auto;
  max-width: 160px;
  color: var(--fg-dim);
  font: 560 10px var(--font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-action-help {
  flex: 0 1 210px;
  min-width: 148px;
  color: var(--fg-dim);
  font: 560 10px var(--font);
  line-height: 1.25;
}

.document-surface-help {
  flex: 0 0 auto;
  margin: 0 0 8px;
  color: var(--fg);
  font: 760 18px/1.18 var(--font);
}

.document-save-status.ok,
.document-render-status.ok {
  color: rgba(14, 105, 94, 0.88);
}

.document-save-status.error,
.document-render-status.error {
  color: rgba(154, 66, 65, 0.9);
}

.document-new-button,
.document-ai-insert,
.document-render-button,
.document-save-button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(31, 42, 46, 0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: rgba(24, 35, 39, 0.78);
  font: 650 10px var(--font);
  cursor: pointer;
}

.document-data-insert {
  flex: 0 0 188px;
  min-width: 168px;
  height: 28px;
  padding: 0 26px 0 10px;
  border: 1px solid rgba(31, 42, 46, 0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: rgba(24, 35, 39, 0.78);
  font: 650 10.5px var(--font);
  outline: none;
}

.document-render-button {
  background: rgba(246, 250, 250, 0.68);
}

.document-data-insert:disabled,
.document-ai-insert:disabled,
.document-new-button:disabled,
.document-render-button:disabled,
.document-save-button:disabled {
  cursor: default;
  opacity: 0.58;
}

.document-body {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  resize: none;
  padding: 16px;
  border: 1px solid rgba(31, 42, 46, 0.13);
  border-radius: 8px;
  background: rgba(255,255,255,0.84);
  color: rgba(24, 35, 39, 0.9);
  font: 13px/1.55 var(--font);
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.84),
    0 12px 30px rgba(20, 90, 95, 0.07);
}

.document-retrieval-preview {
  display: flex;
  flex: 0 0 30%;
  min-height: 128px;
  max-height: 34%;
  flex-direction: column;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(31, 42, 46, 0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.66);
}

.document-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.08);
  color: rgba(24, 35, 39, 0.78);
  font: 650 10.5px var(--font);
}

.document-preview-context {
  flex: 1 1 auto;
  min-width: 160px;
  color: rgba(24, 35, 39, 0.62);
  font: 560 10px/1.3 var(--font);
}

.document-render-status {
  max-width: 260px;
  text-align: right;
}

.document-rendered-body {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  overflow: auto;
  padding: 16px;
  color: rgba(24, 35, 39, 0.86);
  font: 13px/1.58 var(--font);
}

.document-rendered-body p {
  margin: 0 0 10px;
}

.document-rendered-body p:last-child,
.document-rendered-body .document-list:last-child,
.document-rendered-body blockquote:last-child,
.document-rendered-body .document-callout:last-child,
.document-rendered-body .document-rendered-table:last-child {
  margin-bottom: 0;
}

.document-heading {
  margin: 0 0 8px;
  color: rgba(18, 29, 34, 0.94);
  font-weight: 700;
  letter-spacing: 0;
}

.document-heading-1 {
  font-size: 18px;
  line-height: 1.25;
}

.document-heading-2 {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.3;
}

.document-heading-3 {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(24, 35, 39, 0.8);
}

.document-list {
  margin: 0 0 11px 20px;
  padding: 0;
}

.document-list li {
  margin: 0 0 4px;
}

.document-rendered-body blockquote {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-left: 3px solid rgba(15, 143, 152, 0.35);
  background: rgba(246, 250, 250, 0.74);
  color: rgba(24, 35, 39, 0.78);
}

.document-rendered-body a {
  color: rgba(12, 105, 130, 0.95);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.document-callout {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 143, 152, 0.18);
  border-radius: 8px;
  background: rgba(238, 248, 247, 0.76);
}

.document-callout-label {
  margin-bottom: 5px;
  color: rgba(14, 91, 96, 0.94);
  font: 700 11px/1.3 var(--font);
  text-transform: uppercase;
}

.document-callout-body {
  color: rgba(24, 35, 39, 0.84);
}

.document-rendered-table {
  width: 100%;
  margin: 0 0 12px;
  border-collapse: collapse;
  table-layout: auto;
  background: rgba(255,255,255,0.78);
  font: 12px/1.45 var(--font);
}

.document-rendered-table th,
.document-rendered-table td {
  padding: 7px 8px;
  border: 1px solid rgba(31, 42, 46, 0.12);
  vertical-align: top;
}

.document-rendered-table th {
  background: rgba(246, 250, 250, 0.92);
  color: rgba(24, 35, 39, 0.82);
  font-weight: 700;
}

.document-table-align-right {
  text-align: right;
}

.document-table-align-center {
  text-align: center;
}

.document-render-empty {
  color: var(--fg-dim);
}

#grid-container {
  flex: 1; position: relative; overflow: auto;
  cursor: cell;
  background: #FFFFFF;
  border: 1px solid rgba(31, 42, 46, 0.10);
  border-radius: 11px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    inset 0 0 18px rgba(20, 90, 95, 0.035),
    0 12px 30px rgba(20, 90, 95, 0.09);
  transition: box-shadow var(--motion-fast), border-color var(--motion-fast), background-color var(--motion-fast);
}
#grid-container:focus-within {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 0 0 2px rgba(15, 143, 152, 0.08),
    inset 0 0 18px rgba(20, 90, 95, 0.035),
    0 12px 30px rgba(20, 90, 95, 0.09);
}
#grid-canvas {
  display: block;
  position: sticky;
  left: 0;
  top: 0;
  z-index: 1;
  border-radius: 10px;
  outline: none;
}
#grid-scroll-spacer {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

#cell-editor {
  display: none; position: absolute;
  background: var(--bg-input); color: var(--fg);
  border: 2px solid var(--select);
  padding: 1px 4px;
  font-family: var(--mono); font-size: 12px;
  font-variant-numeric: tabular-nums;
  outline: none; z-index: 10;
}

/* ─── Side panel ─── */

#side-panel {
  background: transparent;
  border: 0;
  border-radius: 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  box-shadow: none;
  transition: box-shadow var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast);
}
#side-panel.collapsed {
  overflow: hidden;
}
#side-panel.collapsed > *:not(.panel-rail-label) {
  display: none;
}
.panel-rail-label {
  display: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  color: var(--fg-dim);
  font-size: 10px;
  padding: 8px 0;
  text-align: center;
  cursor: pointer;
  user-select: none;
  letter-spacing: 0.4px;
}
#side-panel.collapsed .panel-rail-label {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.panel-section {
  padding: 16px 14px;
  border-bottom: 0;
}
.panel-section:last-child {
  border-bottom: none;
}
#side-panel > .panel-section:last-child {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
#side-panel > .panel-section.product-internal {
  display: none !important;
}
.research-shell-section {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 16px 14px;
}
.research-shell {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: rgba(24, 35, 39, 0.92);
  height: 100%;
  padding: 0;
}
.research-shell-head {
  display: block;
  margin-bottom: 18px;
}
.research-shell-title {
  color: rgba(24, 35, 39, 0.92);
  font-size: 13px;
  font-weight: 680;
}
.research-shell-composer {
  border-top: 0;
  margin: 0;
  padding: 0;
}
.research-shell-prompt-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.research-shell-prompt-glyph {
  color: rgba(24, 35, 39, 0.92);
  font: 600 13px/1.5 var(--font);
  padding-top: 1px;
}
.research-shell-input {
  min-height: 24px;
  resize: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(24, 35, 39, 0.92);
  font: 12px/1.5 var(--font);
  padding: 1px 0;
}
.research-shell-input:focus {
  border-color: transparent;
  outline: none;
}
.research-shell-transcript {
  display: grid;
  flex: 1 1 auto;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 0;
}
.research-shell-transcript:empty {
  display: block;
}
.research-shell-entry-pending .research-shell-entry-body {
  color: rgba(80, 88, 96, 0.72);
  font-style: italic;
}
.panel-section h3 {
  font-size: 10px; text-transform: none;
  color: rgba(116, 123, 132, 0.76); margin-bottom: 8px;
  letter-spacing: 0; font-weight: 520;
}

/* Action buttons in panel */
.panel-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
}

.btn {
  padding: 6px 11px;
  background: rgba(255,255,255,0.36);
  color: var(--fg-muted);
  border: 1px solid rgba(221, 225, 230, 0.72);
  border-radius: 999px;
  font-family: var(--font); font-size: 10px;
  cursor: pointer;
  transition: color var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast), transform var(--motion-fast);
}
.btn:hover {
  color: var(--fg);
  border-color: rgba(116, 123, 132, 0.58);
  background: rgba(255,255,255,0.58);
}
.btn:active {
  background: rgba(255,255,255,0.74);
  transform: translateY(1px);
}

/* Data lists */
.data-list {
  overflow-y: auto;
  font-size: 11px; line-height: 1.65;
}
.data-list .item {
  padding: 3px 0;
  border-bottom: 1px solid rgba(240, 242, 244, 0.72);
  display: flex; justify-content: space-between; gap: 8px;
}
.data-list .item .label {
  color: var(--fg-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.data-list .item .val {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Table preview */
.table-preview {
  width: 100%; overflow: auto; font-size: 10px;
}
.table-preview table { border-collapse: collapse; width: 100%; }
.table-preview th, .table-preview td {
  padding: 2px 6px; text-align: left;
  border-bottom: 1px solid var(--gridline);
  white-space: nowrap;
}
.table-preview th {
  color: var(--accent); background: var(--bg-header);
  position: sticky; top: 0; font-weight: 500;
}
.table-preview td { color: var(--fg-muted); }

/* ─── Tabs ─── */
.tab-bar {
  display: flex; gap: 3px;
  border-bottom: 1px solid rgba(221, 225, 230, 0.48);
  padding-bottom: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;           /* Firefox */
  -ms-overflow-style: none;        /* IE/Edge */
}
.tab-bar::-webkit-scrollbar {
  display: none;                   /* Chrome/Safari */
}
.tab-bar .tab {
  padding: 5px 9px; font-size: 10px; cursor: pointer;
  color: var(--fg-dim);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  flex-shrink: 0; white-space: nowrap;
}
.tab-bar .tab:hover {
  color: var(--fg-muted);
  background: rgba(255,255,255,0.38);
}
.tab-bar .tab.active {
  color: var(--accent);
  background: rgba(216, 243, 245, 0.52);
  border-color: rgba(15, 143, 152, 0.16);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Bottom status bar ─── */

#bottombar {
  padding: 0 16px;
  background: transparent;
  border-top: 0;
  font-size: 9.5px; color: rgba(116, 123, 132, 0.22);
  display: flex; justify-content: space-between; align-items: center;
  height: 15px; min-height: 15px;
}
#log-msg {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#log-msg.error { color: var(--error); }
#log-msg.success { color: var(--success); }
#pos-info { color: rgba(116, 123, 132, 0.21); margin-left: 10px; }

.chrome-status-rail {
  position: absolute;
  right: 24px;
  bottom: 14px;
  z-index: 45;
  max-width: 520px;
  border: none;
  background: transparent;
  color: #b23a3a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 14px;
  min-height: 16px;
  padding-bottom: 2px;
  opacity: 0.72;
  text-align: right;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  pointer-events: none;
}

.chrome-status-rail.normal,
.chrome-status-rail.pending {
  color: #b23a3a;
}

.chrome-status-rail.stale,
.chrome-status-rail.warning,
.chrome-status-rail.error {
  color: #b23a3a;
  opacity: 0.86;
}

/* ─── Keyboard help overlay ─── */

#kb-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 100;
  justify-content: center; align-items: center;
}
#kb-overlay.visible { display: flex; }

#kb-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 32px;
  max-width: 420px; width: 90%;
  color: var(--fg);
}
#kb-modal h2 {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
#kb-modal table { width: 100%; border-collapse: collapse; }
#kb-modal td {
  padding: 3px 0; font-size: 11px;
  border-bottom: 1px solid var(--gridline);
}
#kb-modal td:first-child {
  color: var(--fg-muted); width: 50%;
}
#kb-modal td:last-child {
  color: var(--fg-dim);
}
kbd {
  background: var(--bg-grid);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-family: var(--font); font-size: 10px;
  color: var(--fg);
}
#kb-dismiss {
  margin-top: 14px; text-align: center;
  color: var(--fg-dim); font-size: 10px;
}

@keyframes surfaceIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.985) translateY(4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ─── Datasheet status ─── */

.ds-item {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 11px;
}
.ds-item .dot { flex-shrink: 0; }
.dot-ok    { background: var(--success); }
.dot-stale { background: var(--dirty); }
.dot-fail  { background: var(--error); }
.dot-unknown { background: var(--fg-dim); }
.ds-item .ds-name {
  color: var(--fg-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}
.ds-item .ds-info {
  color: var(--fg-dim); font-size: 10px;
  white-space: nowrap;
}
.ds-item .ds-sync-btn {
  padding: 1px 6px;
  background: transparent;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: var(--font); font-size: 9px;
  cursor: pointer;
  flex-shrink: 0;
}
.ds-item .ds-sync-btn:hover {
  color: var(--fg); border-color: var(--fg-dim);
}

/* ─── Error list ─── */

.err-item {
  display: flex; align-items: baseline; gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 11px;
  cursor: pointer;
}
.err-item:hover { background: rgba(255,255,255,0.03); }
.err-item .err-addr {
  color: var(--error);
  font-weight: 500;
  flex-shrink: 0;
  min-width: 36px;
}
.err-item .err-msg {
  color: var(--fg-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ─── Sheet tabs ─── */

#sheet-tabs {
  display: flex; align-items: center;
  background: rgba(255,255,255,0.42);
  border-top: 1px solid rgba(31, 42, 46, 0.06);
  height: 24px; min-height: 24px;
  padding: 0 9px;
  user-select: none;
  overflow-x: auto;
  overflow-y: hidden;
}
#sheet-tab-list {
  display: flex; align-items: center; gap: 0;
  flex: 1;
  overflow-x: auto;
}
.sheet-tab {
  padding: 2px 11px;
  font-size: 10px;
  color: rgba(107, 122, 128, 0.72);
  cursor: pointer;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: color 0.12s, background 0.12s;
}
.sheet-tab:hover {
  color: var(--fg-muted);
  background: rgba(255,255,255,0.38);
}
.sheet-tab.active {
  color: var(--accent-dark);
  background: rgba(216, 243, 245, 0.55);
  border-color: rgba(15, 143, 152, 0.16);
}
#btn-add-sheet {
  padding: 2px 8px;
  background: rgba(255,255,255,0.3);
  color: var(--fg-dim);
  border: 1px solid rgba(31, 42, 46, 0.10);
  border-radius: 999px;
  font-family: var(--font); font-size: 12px;
  cursor: pointer;
  margin-left: 4px;
  flex-shrink: 0;
}
#btn-add-sheet:hover {
  color: var(--fg);
  border-color: var(--fg-dim);
}

/* ─── Color dot ─── */

#color-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: none;
  margin: 0 4px;
  flex-shrink: 0;
}
#color-dot.visible {
  display: inline-block;
}

/* ─── Named ranges ─── */

.name-item {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 11px;
}
.name-item .name-id {
  color: var(--accent);
  font-weight: 500;
  min-width: 60px;
}
.name-item .name-range {
  color: var(--fg-muted);
  flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.name-item .name-del {
  padding: 0 4px;
  background: transparent;
  color: var(--fg-dim);
  border: none;
  font-family: var(--font); font-size: 10px;
  cursor: pointer;
}
.name-item .name-del:hover { color: var(--error); }

/* ─── Version select ─── */

.version-select {
  background: rgba(255,255,255,0.50);
  color: rgba(36, 56, 62, 0.86);
  border: 1px solid rgba(22, 102, 110, 0.18);
  border-radius: 999px;
  padding: 1px 8px;
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 620;
  outline: none;
  max-width: 104px;
  min-width: 70px;
  flex: 0 1 104px;
  cursor: pointer;
  margin-right: 2px;
}
.version-select:focus {
  border-color: var(--accent);
}

/* ─── Read-only banner ─── */

.readonly-banner {
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid var(--dirty);
  color: var(--dirty);
  font-size: 11px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.readonly-note {
  color: rgba(31, 42, 46, 0.58);
}
.readonly-banner .btn {
  color: var(--dirty);
  border-color: var(--dirty);
  font-size: 10px;
  padding: 2px 8px;
}

/* ─── Clear cache overlay ─── */

#cc-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 100;
  justify-content: center; align-items: center;
}
#cc-overlay.visible { display: flex; }

#cc-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 32px;
  max-width: 380px; width: 90%;
  color: var(--fg);
}
#cc-modal h2 {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}
.cc-stat {
  display: flex; justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 11px;
}
.cc-stat .label { color: var(--fg-muted); }
.cc-stat .val { color: var(--fg); font-variant-numeric: tabular-nums; }
#cc-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 14px;
}

/* ─── Import XLSX overlay ─── */

#import-overlay {
  display: none; position: fixed; inset: 0;
  background: var(--bg-overlay);
  z-index: 100;
  justify-content: center; align-items: center;
}
#import-overlay.visible { display: flex; }

#import-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 32px;
  max-width: 420px; width: 90%;
  color: var(--fg);
}
#import-modal h2 {
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.import-field {
  margin-bottom: 10px;
}
.import-field label {
  display: block;
  font-size: 10px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.import-file-row {
  display: flex; align-items: center; gap: 8px;
}
#import-file-name {
  color: var(--fg-muted);
  font-size: 11px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}
#import-project-name {
  width: 100%;
  background: var(--bg-input);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 8px;
  font-family: var(--font);
  font-size: 11px;
  outline: none;
}
#import-project-name:focus {
  border-color: var(--accent);
}
.import-dest {
  font-size: 10px;
  color: var(--fg-dim);
}
.import-field-error {
  margin-top: 4px;
  color: var(--error);
  font-size: 10px;
  line-height: 1.35;
}
#import-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 14px;
}
#import-submit:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.import-result {
  margin-top: 14px;
  border-top: 1px solid var(--gridline);
  padding-top: 10px;
  min-height: 44px;
  color: var(--fg-muted);
  font-size: 11px;
  line-height: 1.45;
}

.import-result[data-import-state="failure"] .import-result-title {
  color: var(--error);
}

.import-result[data-import-state="partial"] .import-result-title {
  color: var(--warn);
}

.import-result[data-import-state="created_import_failed"] .import-result-title {
  color: var(--success);
}

.import-result-title {
  color: var(--fg);
  font-weight: 650;
  margin-bottom: 3px;
}

.import-result-copy {
  margin-bottom: 8px;
}

.import-result-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  padding: 3px 0;
}

.import-result-row span {
  color: var(--fg-dim);
}

.import-result-row strong {
  color: var(--fg-muted);
  font-weight: 560;
  overflow-wrap: anywhere;
}

.import-result-subtitle {
  color: var(--fg);
  font-weight: 650;
  margin-top: 9px;
  margin-bottom: 3px;
}

.import-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.import-open-model-next {
  margin-top: 8px;
}

/* ─── Health ─── */

.health-error { color: var(--error); }
.health-warning { color: var(--dirty); }
.health-info { color: var(--fg-dim); }
.dot-error { background: var(--error); }
.dot-warning { background: var(--dirty); }
.dot-ok { background: var(--success); }

.health-item {
  display: flex; align-items: baseline; gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 11px;
}
.health-item .severity-icon {
  font-size: 10px;
  flex-shrink: 0;
}
.health-item .health-msg {
  color: var(--fg-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}
.health-item .health-target {
  color: var(--accent);
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.health-item .health-target:hover { text-decoration: underline; }

/* ─── Import summary ─── */

#import-summary {
  font-size: 11px;
  padding: 4px 0;
}
#import-summary .import-stat {
  display: flex; justify-content: space-between;
  padding: 2px 0;
  border-bottom: 1px solid var(--gridline);
}
#import-summary .import-stat .label { color: var(--fg-muted); }
#import-summary .import-stat .val { color: var(--fg); }

/* ─── Import issue list ─── */

.import-issue-item {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 11px;
}
.import-issue-item:hover { background: rgba(255,255,255,0.03); }
.import-issue-item .import-issue-loc {
  color: var(--accent);
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
  min-width: 70px;
}
.import-issue-item .import-issue-loc:hover { text-decoration: underline; }
.import-issue-item .import-issue-formula {
  color: var(--fg-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
  font-size: 10px;
}
.import-issue-item .btn {
  padding: 1px 6px;
  font-size: 9px;
  flex-shrink: 0;
}

/* ─── Import filter bar ─── */

.import-filter-bar {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 6px;
}
.import-filter-bar .btn {
  padding: 2px 8px;
  font-size: 9px;
}
.import-filter-bar .btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(74, 158, 245, 0.08);
}

/* ─── Import tab hierarchy ─── */

.import-tab-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.import-tab-section {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--gridline);
}

.import-tab-section:last-child {
  border-bottom: 0;
}

.import-section-heading {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 3px;
}

.import-section-copy {
  font-size: 10px;
  line-height: 1.45;
  color: var(--fg-dim);
  max-width: 640px;
}

.import-review-section {
  padding-top: 2px;
}

.import-repair-section {
  padding-top: 2px;
}

.import-repair-section #import-summary {
  margin-top: 8px;
}

/* ─── Vendor dependency review projection ─── */

#vendor-dependency-review {
  margin-top: 0;
}

.vendor-dependency-review {
  font-size: 11px;
  color: var(--fg);
}

.vendor-dependency-header,
.vendor-dependency-section-header,
.vendor-dependency-counts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vendor-dependency-header {
  margin-bottom: 8px;
}

.vendor-dependency-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.vendor-dependency-title,
.vendor-dependency-section-title {
  font-weight: 600;
  color: var(--fg);
}

.vendor-dependency-status,
.vendor-dependency-section-meta,
.vendor-dependency-empty,
.vendor-dependency-effect-metadata,
.vendor-dependency-reasons,
.vendor-dependency-subtitle,
.vendor-dependency-readonly-note,
.vendor-dependency-substatus {
  color: var(--fg-dim);
}

.vendor-dependency-status {
  text-transform: capitalize;
}

.vendor-dependency-counts {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.vendor-dependency-subtitle,
.vendor-dependency-readonly-note {
  font-size: 10px;
  line-height: 1.45;
}

.vendor-dependency-readonly-note {
  margin: 0 0 8px;
  max-width: 720px;
}

.vendor-dependency-export {
  color: var(--accent);
  font-size: 10px;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 143, 152, 0.28);
}

.vendor-dependency-export:hover {
  color: var(--accent-strong);
}

.vendor-dependency-count {
  min-width: 86px;
  padding: 4px 0;
  border-bottom: 1px solid var(--gridline);
}

.vendor-dependency-count span {
  display: block;
  color: var(--fg-muted);
  font-size: 9px;
}

.vendor-dependency-count strong {
  font-weight: 600;
  color: var(--fg);
}

.vendor-dependency-section {
  margin-top: 10px;
}

.vendor-dependency-section-header {
  padding: 2px 0 5px;
  border-bottom: 1px solid var(--gridline);
}

.vendor-dependency-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  table-layout: fixed;
}

.vendor-dependency-table th,
.vendor-dependency-table td {
  padding: 4px 5px;
  border-bottom: 1px solid var(--gridline);
  text-align: left;
  vertical-align: top;
}

.vendor-dependency-table th {
  color: var(--fg-muted);
  font-size: 9px;
  font-weight: 600;
}

.vendor-dependency-loc {
  color: var(--accent);
  white-space: nowrap;
}

.vendor-dependency-formula {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.vendor-dependency-effects,
.vendor-dependency-effect-metadata {
  font-family: var(--font-mono);
  font-size: 9px;
}

.vendor-dependency-reasons {
  margin-top: 2px;
  font-size: 9px;
}

/* ─── Prod mode banner ─── */

.prod-banner {
  background: rgba(74, 158, 245, 0.10);
  border-bottom: 1px solid var(--accent-dim);
  color: var(--accent);
  font-size: 10px;
  padding: 3px 12px;
  display: none;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.5px;
}
.prod-banner.visible { display: flex; }
.prod-banner .prod-label {
  font-weight: 600;
  text-transform: uppercase;
}

/* ─── Checks tab ─── */

.check-section {
  margin-bottom: 10px;
}
.check-section h4 {
  font-size: 9px; text-transform: uppercase;
  color: var(--fg-dim); margin-bottom: 4px;
  letter-spacing: 0.8px; font-weight: 500;
}
.check-pass { color: var(--success); }
.check-fail { color: var(--error); }
.check-warn { color: var(--dirty); }
.check-none { color: var(--fg-dim); }
.check-item {
  display: flex; align-items: baseline; gap: 6px;
  padding: 2px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 11px;
}
.check-item .check-icon { flex-shrink: 0; font-size: 10px; }
.check-item .check-label {
  color: var(--fg-muted); flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.check-item .check-value {
  color: var(--fg); font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ─── Logs tab ─── */

.log-controls {
  display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap;
}
.log-controls select {
  background: var(--bg-input);
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 4px;
  font-family: var(--font);
  font-size: 10px;
  outline: none;
}
.log-entry {
  padding: 2px 0;
  border-bottom: 1px solid var(--gridline);
  font-size: 10px;
  line-height: 1.5;
}
.log-entry .log-ts { color: var(--fg-dim); }
.log-entry .log-level { font-weight: 500; }
.log-entry .log-level-info { color: var(--fg-muted); }
.log-entry .log-level-warning { color: var(--dirty); }
.log-entry .log-level-error { color: var(--error); }
.log-entry .log-type { color: var(--accent); }
.log-entry .log-msg { color: var(--fg-muted); }

/* ─── Context menu ─── */

#grid-context-menu {
  display: none;
  position: absolute;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 0;
  z-index: 20;
  min-width: 160px;
  box-shadow: var(--shadow);
}
#grid-context-menu.visible { display: block; }

.ctx-item {
  padding: 5px 14px;
  font-size: 11px;
  color: var(--fg-muted);
  cursor: pointer;
  white-space: nowrap;
}
.ctx-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--fg);
}
.ctx-item.disabled {
  opacity: 0.45;
  cursor: default;
}
.ctx-item.disabled:hover {
  background: transparent;
  color: var(--fg-muted);
}
.ctx-sep {
  height: 1px;
  background: var(--border);
  margin: 3px 0;
}

/* ─── KPI Lookup Inspector ─── */

.primary-work-area:has(#kpi-lookup-inspector:not([hidden])) {
  flex-direction: row;
  gap: 10px;
}

.kpi-lookup-inspector {
  flex: 0 0 clamp(260px, 23vw, 340px);
  min-width: 240px;
  max-width: 360px;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(31, 42, 46, 0.13);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--fg);
  padding: 12px;
}

.kpi-lookup-inspector[hidden] {
  display: none !important;
}

.kpi-lookup-inspector-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.12);
}

.kpi-lookup-inspector-eyebrow,
.kpi-lookup-section-label {
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0;
  text-transform: uppercase;
}

#kpi-lookup-inspector-title {
  margin: 2px 0 0;
  color: var(--fg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}

.kpi-lookup-inspector-close,
.kpi-lookup-link-button,
.kpi-lookup-action {
  border: 1px solid rgba(31, 42, 46, 0.16);
  border-radius: 5px;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 8px;
}

.kpi-lookup-action[disabled],
.kpi-lookup-action[aria-disabled="true"] {
  cursor: default;
  opacity: 0.48;
}

.kpi-lookup-inspector-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 10px;
}

.kpi-lookup-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(31, 42, 46, 0.10);
}

.kpi-lookup-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.kpi-lookup-field {
  display: grid;
  grid-template-columns: minmax(72px, 0.38fr) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
}

.kpi-lookup-field span,
.kpi-lookup-muted-line,
.kpi-lookup-unit,
.kpi-lookup-status,
.kpi-lookup-authority,
.kpi-lookup-evidence-ref span,
.kpi-lookup-diagnostic span {
  color: var(--fg-dim);
}

.kpi-lookup-field strong,
.kpi-lookup-evidence-ref strong,
.kpi-lookup-diagnostic strong {
  color: var(--fg);
  font-weight: 500;
}

.kpi-lookup-value {
  color: var(--fg);
  font-family: var(--mono);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.kpi-lookup-evidence-ref,
.kpi-lookup-diagnostic,
.kpi-lookup-inserted,
.kpi-lookup-insert-error,
.kpi-lookup-overwrite-warning {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
}

.kpi-lookup-inserted {
  color: var(--fg);
}

.kpi-lookup-insert-error,
.kpi-lookup-overwrite-warning {
  color: var(--fg-muted);
}

.kpi-lookup-actions {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}

.kpi-lookup-structure-row {
  height: 12px;
  border-top: 1px solid rgba(31, 42, 46, 0.16);
}

.kpi-lookup-structure-row.short {
  width: 64%;
}

.kpi-lookup-unavailable {
  color: var(--fg-muted);
  font-size: 12px;
  padding: 8px 0;
}

/* ─── Incident cards ─── */

.incident-card {
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 3px;
  border-left: 3px solid var(--border);
  background: rgba(255,255,255,0.02);
  font-size: 11px;
}
.incident-card.severity-error { border-left-color: var(--error); }
.incident-card.severity-warning { border-left-color: var(--dirty); }
.incident-card.severity-info { border-left-color: var(--fg-dim); }

.incident-card .incident-header {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 2px;
}
.incident-card .incident-icon { font-size: 10px; flex-shrink: 0; }
.incident-card .incident-title {
  color: var(--fg);
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
}
.incident-card .incident-detail {
  color: var(--fg-muted);
  font-size: 10px;
  line-height: 1.5;
}
.incident-card .incident-loc {
  color: var(--accent);
  font-size: 10px;
  cursor: pointer;
  margin-top: 2px;
}
.incident-card .incident-loc:hover { text-decoration: underline; }
.incident-card .incident-action {
  color: var(--fg-dim);
  font-size: 9px;
  font-style: italic;
  margin-top: 2px;
}

.incidents-summary {
  display: flex; gap: 10px;
  padding: 4px 0 6px 0;
  font-size: 10px;
  border-bottom: 1px solid var(--gridline);
  margin-bottom: 6px;
}
.incidents-summary .cnt { font-variant-numeric: tabular-nums; }
.incidents-summary .cnt-error { color: var(--error); }
.incidents-summary .cnt-warning { color: var(--dirty); }
.incidents-summary .cnt-info { color: var(--fg-dim); }

/* ─── Pipeline button ─── */

.btn-pipeline, .btn-pipeline-menu {
  background: rgba(74, 158, 245, 0.14) !important;
  border-color: rgba(74, 158, 245, 0.35) !important;
  color: var(--accent) !important;
}
.btn-pipeline:hover, .btn-pipeline-menu:hover {
  background: rgba(74, 158, 245, 0.22) !important;
  color: #7AB8F7 !important;
}

/* ─── Scrollbar ─── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--grid-strong); }

#grid-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

/* ─── Table view sort/filter ─── */

.view-toolbar {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 4px 0 6px 0;
  border-bottom: 1px solid var(--gridline);
  margin-bottom: 4px;
}
.view-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 9px;
  font-family: var(--font);
  white-space: nowrap;
  cursor: default;
}
.view-chip-sort {
  color: var(--select);
  background: rgba(96, 165, 250, 0.10);
  border: 1px solid rgba(96, 165, 250, 0.25);
}
.view-chip-filter {
  color: var(--accent);
  background: rgba(74, 158, 245, 0.10);
  border: 1px solid rgba(74, 158, 245, 0.25);
}
.view-chip-clear {
  color: var(--fg-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  cursor: pointer;
}
.view-chip-clear:hover {
  color: var(--fg-muted);
  background: rgba(255, 255, 255, 0.08);
}
.view-chip-x {
  cursor: pointer;
  font-size: 11px;
  opacity: 0.6;
}
.view-chip-x:hover { opacity: 1; }

/* Table header states */
.tv-th {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color 0.12s, background 0.12s;
}
.tv-th:hover {
  background: rgba(96, 165, 250, 0.08) !important;
}
.tv-th-sorted {
  color: var(--select) !important;
  background: rgba(96, 165, 250, 0.06) !important;
}
.tv-filter-badge {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  font-size: 8px;
  font-weight: 600;
  border-radius: 2px;
  padding: 0 3px;
  margin-left: 3px;
  vertical-align: middle;
}

/* Filter panel */
.view-filter-panel {
  position: fixed;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  z-index: 200;
  min-width: 240px;
  max-width: 280px;
  box-shadow: var(--shadow);
  font-size: 11px;
}
.vfp-header {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gridline);
}
.vfp-section {
  margin-bottom: 8px;
}
.vfp-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-dim);
  margin-bottom: 3px;
}
.vfp-row {
  display: flex; gap: 4px; align-items: center;
}
.vfp-select {
  background: var(--bg-input);
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 4px;
  font-family: var(--font);
  font-size: 10px;
  outline: none;
}
.vfp-select:focus { border-color: var(--accent); }
.vfp-input {
  flex: 1;
  background: var(--bg-input);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  font-family: var(--font);
  font-size: 10px;
  outline: none;
  min-width: 0;
}
.vfp-input:focus { border-color: var(--accent); }
.vfp-apply {
  padding: 2px 8px !important;
  font-size: 9px !important;
  flex-shrink: 0;
}
.vfp-values {
  max-height: 140px;
  overflow-y: auto;
  padding: 2px 0;
  margin-bottom: 4px;
}
.vfp-val-label {
  display: flex; align-items: center; gap: 4px;
  padding: 1px 0;
  color: var(--fg-muted);
  font-size: 10px;
  cursor: pointer;
}
.vfp-val-label:hover { color: var(--fg); }
.vfp-val-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 12px; height: 12px;
  flex-shrink: 0;
}

/* ═════════════════════════════════════════════
   Mode Switcher
   ═════════════════════════════════════════════ */

#mode-switcher {
  display: flex;
  gap: 1px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-right: 10px;
}
.mode-btn {
  padding: 3px 10px;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border: none;
  background: var(--bg-panel);
  color: var(--fg-dim);
  cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.mode-btn:hover {
  color: var(--fg-muted);
  background: rgba(255,255,255,0.04);
}
.mode-btn.active {
  color: var(--accent);
  background: rgba(74, 158, 245, 0.12);
}

/* Deferred terminal command registry output block types */
.term-block { margin-bottom: 6px; }
.term-echo {
  color: var(--fg-dim);
  font-size: 10px;
}
.term-echo::before {
  content: 'fin123> ';
  color: var(--accent);
  font-weight: 600;
}
.term-status {
  padding: 4px 8px;
  border-left: 3px solid var(--accent);
  background: rgba(74, 158, 245, 0.05);
}
.term-status .term-status-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.term-status .term-status-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 0;
}
.term-status .term-status-key { color: var(--fg-dim); }
.term-status .term-status-val { color: var(--fg); font-variant-numeric: tabular-nums; }
.term-error {
  padding: 4px 8px;
  border-left: 3px solid var(--error);
  background: rgba(251, 113, 133, 0.05);
  color: var(--error);
}
.term-success {
  padding: 4px 8px;
  border-left: 3px solid var(--success);
  background: rgba(52, 211, 153, 0.05);
  color: var(--success);
}
.term-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  margin: 2px 0;
}
.term-table th {
  text-align: left;
  padding: 2px 8px 2px 0;
  color: var(--accent);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.term-table td {
  padding: 2px 8px 2px 0;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--gridline);
}
.term-list-item {
  padding: 1px 0;
  color: var(--fg-muted);
}
.term-list-item .term-list-key {
  color: var(--accent);
  font-weight: 500;
}
.term-card {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(255,255,255,0.02);
  margin: 2px 0;
}
.term-card .term-card-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
  margin-bottom: 2px;
}
.term-card .term-card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 0;
  font-size: 10px;
}
.term-card .term-card-key { color: var(--fg-dim); }
.term-card .term-card-val { color: var(--fg); font-variant-numeric: tabular-nums; }
.term-diff-header {
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
  margin: 4px 0 2px;
}
.term-diff-row {
  display: flex;
  gap: 8px;
  padding: 1px 0;
  font-size: 10px;
}
.term-diff-name { color: var(--fg-muted); min-width: 140px; }
.term-diff-old { color: var(--error); }
.term-diff-arrow { color: var(--fg-dim); }
.term-diff-new { color: var(--success); }
.term-help-group {
  margin-bottom: 6px;
}
.term-help-group-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.term-help-row {
  display: flex;
  gap: 12px;
  padding: 1px 0;
  font-size: 10px;
}
.term-help-cmd {
  color: var(--fg);
  font-weight: 500;
  min-width: 200px;
  flex-shrink: 0;
}
.term-help-desc { color: var(--fg-dim); }
.term-text { color: var(--fg-muted); }

/* ── Section headers within output ── */
.term-section {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--fg-dim);
  margin: 8px 0 3px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--gridline);
}

/* ── Compare container ── */
.term-compare {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  background: rgba(255,255,255,0.01);
  margin: 2px 0;
}
.term-compare-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.term-compare-title {
  color: var(--accent);
  font-weight: 600;
  font-size: 11px;
}
.term-compare-meta {
  color: var(--fg-dim);
  font-size: 9px;
}
.term-compare-section {
  margin-bottom: 6px;
}
.term-compare-section-title {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--fg-dim);
  margin-bottom: 2px;
}
.term-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  margin: 2px 0;
}
.term-diff-table th {
  text-align: left;
  padding: 2px 8px 2px 0;
  color: var(--fg-dim);
  font-weight: 500;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}
.term-diff-table td {
  padding: 2px 8px 2px 0;
  border-bottom: 1px solid var(--gridline);
  font-variant-numeric: tabular-nums;
}
.term-diff-table td:first-child {
  color: var(--fg-muted);
  font-weight: 500;
}
.term-diff-table .val-old { color: var(--error); }
.term-diff-table .val-new { color: var(--success); }
.term-diff-table .val-arrow { color: var(--fg-dim); padding: 0 2px; }
.term-no-diff {
  color: var(--fg-dim);
  font-size: 10px;
  font-style: italic;
  padding: 2px 0;
}

/* ── Sweep summary ── */
.term-sweep-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 0;
  font-size: 10px;
}
.term-sweep-stat {
  display: flex;
  gap: 4px;
}
.term-sweep-stat-label { color: var(--fg-dim); }
.term-sweep-stat-val { color: var(--fg); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ── Improved table with alternating rows ── */
.term-table tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}
.term-table td.num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── Scenario identity badge ── */
.term-scenario-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgba(74, 158, 245, 0.10);
  color: var(--accent);
  border: 1px solid rgba(74, 158, 245, 0.25);
}
.term-run-id {
  font-family: var(--font);
  font-size: 9px;
  color: var(--fg-dim);
  font-variant-numeric: tabular-nums;
}

/* ── AI explanation and draft blocks ── */
.term-ai-explain {
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 4px;
  padding: 6px 8px;
  background: rgba(168, 85, 247, 0.03);
  margin: 2px 0;
}
.term-ai-explain .term-ai-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
}
.term-ai-explain .term-ai-label {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #c084fc;
}
.term-ai-explain .term-ai-target {
  font-size: 10px;
  color: var(--fg);
  font-weight: 500;
}
.term-ai-explain .term-ai-meta {
  font-size: 9px;
  color: var(--fg-dim);
  margin-left: auto;
}
.term-ai-body {
  color: var(--fg-muted);
  font-size: 11px;
  line-height: 1.6;
  padding: 4px 0 2px;
}
.term-ai-footer {
  font-size: 9px;
  color: var(--fg-dim);
  font-style: italic;
  padding-top: 4px;
  border-top: 1px solid rgba(168, 85, 247, 0.10);
  margin-top: 4px;
}
.term-draft-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  background: rgba(168, 85, 247, 0.10);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.25);
}
.term-status-badge {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.term-status-badge.status-draft { background: rgba(142, 131, 118, 0.15); color: var(--fg-dim); }
.term-status-badge.status-validated { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.term-status-badge.status-applied { background: rgba(96, 165, 250, 0.12); color: var(--select); }
.term-status-badge.status-rejected { background: rgba(251, 113, 133, 0.12); color: var(--error); }
.term-status-badge.status-validation_failed { background: rgba(251, 113, 133, 0.12); color: var(--error); }
.term-code-block {
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.5;
  color: var(--fg-muted);
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg);
  overflow-x: auto;
  max-height: 300px;
  overflow-y: auto;
  margin: 4px 0;
  white-space: pre;
  tab-size: 4;
}
.term-next-steps {
  padding: 4px 8px;
  border-left: 2px solid var(--fg-dim);
  margin: 4px 0;
  font-size: 10px;
}
.term-next-steps .term-step {
  padding: 1px 0;
  color: var(--fg-muted);
}
.term-next-steps .term-step-cmd {
  color: var(--fg);
  font-weight: 500;
}
.term-next-steps .term-step-desc {
  color: var(--fg-dim);
}
.term-validation-result {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  margin: 2px 0;
}
.term-validation-result.valid {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.03);
}
.term-validation-result.invalid {
  border-color: rgba(251, 113, 133, 0.3);
  background: rgba(251, 113, 133, 0.03);
}
.term-validation-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 10px;
}
.term-validation-status {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.term-validation-status.pass { color: var(--success); }
.term-validation-status.fail { color: var(--error); }
.term-violation-item {
  padding: 1px 0;
  font-size: 10px;
}
.term-violation-item .viol-field { color: var(--fg-dim); font-weight: 500; }
.term-violation-item .viol-reason { color: var(--fg-muted); }
.term-violation-item.viol-error .viol-field { color: var(--error); }
.term-violation-item.viol-warning .viol-field { color: var(--dirty); }

/* ── Execution progress ── */
.term-progress {
  padding: 3px 8px;
  background: rgba(96, 165, 250, 0.05);
  border-left: 3px solid var(--select);
  font-size: 10px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
  transition: opacity 0.15s;
}
.term-progress .term-progress-bar {
  display: inline-block;
  width: 60px;
  height: 4px;
  background: var(--gridline);
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: middle;
  overflow: hidden;
}
.term-progress .term-progress-fill {
  height: 100%;
  background: var(--select);
  border-radius: 2px;
  transition: width 0.2s;
}

/* ── Grid matrix table ── */
.term-grid-matrix {
  border-collapse: collapse;
  font-size: 10px;
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.term-grid-matrix th {
  padding: 3px 8px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.term-grid-matrix th:first-child {
  text-align: left;
  color: var(--fg-dim);
  border-right: 1px solid var(--border);
  font-size: 9px;
}
.term-grid-matrix th:not(:first-child) {
  text-align: right;
  color: var(--accent);
}
.term-grid-matrix td {
  padding: 3px 8px;
  border-bottom: 1px solid var(--gridline);
}
.term-grid-matrix td:first-child {
  font-weight: 500;
  color: var(--accent);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.term-grid-matrix td:not(:first-child) {
  text-align: right;
  color: var(--fg);
}
.term-grid-matrix td.grid-err {
  color: var(--error);
  font-style: italic;
}
.term-grid-matrix tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}

/* ═════════════════════════════════════════════
   Mode-specific layout
   ═════════════════════════════════════════════ */

/* ── Spreadsheet Mode ── */
/* ── Spreadsheet Mode — Paper workbook chrome ── */
body.mode-spreadsheet #logo {
  color: #18202A;
}
body.mode-spreadsheet .app-brand-prompt {
  color: var(--accent-dark);
}
body.mode-spreadsheet #cell-addr {
  font-family: var(--mono);
}
body.mode-spreadsheet #fx-label {
  color: var(--fg-dim);
}
body.mode-spreadsheet .btn-pipeline-menu {
  background: none !important;
  border-color: transparent !important;
  color: #444444 !important;
}
body.mode-spreadsheet .btn-pipeline-menu:hover {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #111111 !important;
}
body.mode-spreadsheet #cell-editor {
  background: #FFFFFF;
  color: #111111;
  border-color: #107C41;
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
  line-height: 1;
}
body.zone-mode.mode-spreadsheet #grid-container {
  background: #1B2025;
}
body.zone-mode.mode-spreadsheet #cell-editor {
  background: #20252B;
  color: #F3F6F8;
  border-color: rgba(42, 177, 187, 0.88);
}
body.zone-mode.mode-spreadsheet #cell-editor:focus {
  border-color: rgba(96, 165, 250, 0.88);
}

/* ═════════════════════════════════════════════
   Research History Panel (Phase 3A)
   ═════════════════════════════════════════════ */

.rh-section {
  max-height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.rh-section.rh-collapsed .rh-body { display: none; }
.rh-section.rh-collapsed { max-height: none; }

.rh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rh-toggle {
  background: none; border: none; color: var(--fg-dim);
  font-size: 8px; cursor: pointer; padding: 0 2px;
  transition: transform 0.15s;
}
.rh-section.rh-collapsed .rh-toggle { transform: rotate(-90deg); }

.rh-body {
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
}

.rh-empty {
  font-size: 10px; color: var(--fg-dim);
  padding: 4px 0;
}

/* Branch group */
.rh-branch {
  margin-bottom: 2px;
}
.rh-branch-header {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  font-size: 10px;
  color: var(--fg-muted);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.1s;
  user-select: none;
}
.rh-branch-header:hover { background: rgba(255,255,255,0.04); }
.rh-branch-header.rh-active { color: var(--accent); }

.rh-branch-label {
  font-weight: 600;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rh-branch-count {
  font-size: 9px;
  color: var(--fg-dim);
  flex-shrink: 0;
}
.rh-branch-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  display: none;
}
.rh-active .rh-branch-dot { display: block; }

/* Frame rows */
.rh-frames {
  padding-left: 10px;
}
.rh-frame {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  font-size: 10px;
  color: var(--fg-dim);
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.1s, color 0.1s;
  line-height: 1.4;
}
.rh-frame:hover { background: rgba(255,255,255,0.04); color: var(--fg-muted); }
.rh-frame.rh-current {
  background: rgba(74, 158, 245, 0.12);
  color: var(--fg);
}

.rh-frame-idx {
  width: 14px;
  text-align: right;
  font-size: 9px;
  color: var(--fg-dim);
  flex-shrink: 0;
}
.rh-frame-source {
  font-size: 9px;
  color: var(--fg-dim);
  flex-shrink: 0;
  min-width: 36px;
}
.rh-frame-scalar {
  flex: 1;
  text-align: right;
  font-size: 9px;
  color: var(--fg-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rh-frame-badges {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.rh-badge {
  font-size: 9px;
  line-height: 1;
}
.rh-badge-wp { color: #fbbf24; }
.rh-badge-ob { color: #60a5fa; }

/* ── View toggle (List | Graph) ── */
.rh-view-toggle {
  display: inline-flex;
  gap: 0;
  margin-left: auto;
  margin-right: 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.rh-vbtn {
  background: transparent;
  border: none;
  color: var(--fg-dim);
  font-size: 9px;
  font-family: var(--font);
  padding: 1px 6px;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  line-height: 1.4;
}
.rh-vbtn:not(:last-child) { border-right: 1px solid var(--border); }
.rh-vbtn:hover { color: var(--fg-muted); }
.rh-vbtn.rh-vbtn-active {
  background: rgba(74, 158, 245, 0.15);
  color: var(--accent);
}

/* ── Graph view ── */
.rh-graph {
  overflow: auto;
  scrollbar-width: thin;
}
.rh-graph svg {
  display: block;
}

/* Graph edges */
.rg-edge {
  stroke: var(--border);
  stroke-width: 1.5;
  fill: none;
}
.rg-edge-fork {
  stroke: var(--fg-dim);
  stroke-width: 1;
  stroke-dasharray: 3 2;
  fill: none;
}

/* Graph nodes */
.rg-node {
  cursor: pointer;
}
.rg-node circle {
  fill: var(--bg-header);
  stroke: var(--fg-dim);
  stroke-width: 1.5;
  transition: fill 0.1s, stroke 0.1s;
}
.rg-node:hover circle {
  stroke: var(--fg-muted);
  fill: rgba(255,255,255,0.06);
}
.rg-node.rg-current circle {
  fill: rgba(74, 158, 245, 0.2);
  stroke: var(--accent);
  stroke-width: 2;
}

/* Node labels */
.rg-label {
  font-size: 8px;
  fill: var(--fg-dim);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  font-family: var(--font);
}
.rg-current .rg-label {
  fill: var(--fg);
}

/* Source tag beside node */
.rg-source {
  font-size: 7px;
  fill: var(--fg-dim);
  font-family: var(--font);
  pointer-events: none;
}

/* Branch lane labels */
.rg-branch-label {
  font-size: 9px;
  fill: var(--fg-dim);
  font-family: var(--font);
  font-weight: 600;
  text-anchor: middle;
}
.rg-branch-label.rg-active-label {
  fill: var(--accent);
}

/* Waypoint / observation markers */
.rg-wp {
  fill: #fbbf24;
  pointer-events: none;
}
.rg-ob {
  fill: #60a5fa;
  pointer-events: none;
}

/* Inactive branch dimming */
.rg-lane-inactive {
  opacity: 0.5;
}
.rg-lane-inactive:hover {
  opacity: 0.8;
}

/* ═════════════════════════════════════════════
   App mode — presentation preset for /app
   All rules scoped under body.app-mode.
   Zero impact on the normal product.
   ═════════════════════════════════════════════ */

/* Hide shell chrome */
body.app-mode #formulabar,
body.app-mode #bottombar,
body.app-mode #prod-banner,
body.app-mode #readonly-banner       { display: none !important; }

/* Menubar: hide action items and indicators */
body.app-mode #btn-save,
body.app-mode #btn-sync,
body.app-mode #btn-panel,
body.app-mode #btn-pipeline-menu,
body.app-mode #btn-clear-cache,
body.app-mode #manual-actions,
body.app-mode #health-chip,
body.app-mode #version-select,
body.app-mode #dirty-chip,
body.app-mode #snap-chip             { display: none !important; }

/* Mode switcher: hide non-allowed views */
body.app-mode .mode-btn[data-mode="system"]
                                     { display: none !important; }

/* App title: hidden by default, shown in app mode */
#app-title                           { display: none; }
body.app-mode #app-title {
  display: inline;
  font: 13px/1 -apple-system, 'Segoe UI', sans-serif;
  color: var(--fg-dim, #666);
  margin-left: 10px;
  letter-spacing: 0.3px;
}

/* Layout: reclaim space from hidden elements */
body.app-mode #main {
  grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 440px);
}
body.app-mode #main.panel-collapsed {
  grid-template-columns: 1fr;
}

/* View switcher: segmented control feel */
body.app-mode #mode-switcher {
  background: rgba(0,0,0,0.04);
  border-radius: 6px;
  padding: 2px;
  gap: 0;
}
body.app-mode .mode-btn {
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 12px;
}
body.app-mode .mode-btn.active {
  background: rgba(0,0,0,0.08);
}

/* ═════════════════════════════════════════════
   IRIS model surface identity
   Blueprint is the native workstation medium.
   Paper is the alternate drafting-paper medium.
   ═════════════════════════════════════════════ */

body:not(.model-home-active) #brand-lockup {
  flex-direction: row;
  align-items: baseline;
  gap: 12px;
  width: 224px;
}

body:not(.model-home-active) #logo {
  color: #314F73;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.32em;
}

body:not(.model-home-active) #runtime-identity {
  margin-top: 0;
  color: rgba(49, 79, 115, 0.66);
  font: 560 7px/1.2 var(--mono);
  letter-spacing: 0.16em;
}

body:not(.model-home-active) #menubar {
  background: rgba(248, 246, 241, 0.78);
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) .model-name {
  align-items: center;
  gap: 8px;
  color: rgba(31, 46, 61, 0.92);
  font-size: 13px;
  font-weight: 560;
}

body:not(.model-home-active) .model-name-label {
  color: rgba(49, 79, 115, 0.72);
  font: 560 8px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body:not(.model-home-active) #formulabar {
  background: rgba(248, 246, 241, 0.68);
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #main {
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(49, 79, 115, 0.16);
  border-radius: 6px;
  background:
    linear-gradient(rgba(84, 120, 156, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 120, 156, 0.018) 1px, transparent 1px),
    linear-gradient(180deg, rgba(248, 246, 241, 0.86), rgba(243, 240, 234, 0.72));
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow:
    0 12px 30px rgba(49, 79, 115, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

body:not(.model-home-active) #main::after {
  border-radius: 6px;
  padding: 0;
  background: none;
  border: 1px solid rgba(49, 79, 115, 0.10);
  -webkit-mask: none;
  mask: none;
}

body:not(.model-home-active) #grid-container {
  border: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 3px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 7px 18px rgba(49, 79, 115, 0.08);
}

body:not(.model-home-active) #grid-canvas {
  border-radius: 2px;
}

body:not(.model-home-active) #side-panel {
  border: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 3px;
  background: rgba(248, 246, 241, 0.78);
}

body:not(.model-home-active) .research-shell-section {
  padding: 14px;
}

body:not(.model-home-active) .research-shell-title {
  color: rgba(49, 79, 115, 0.92);
  font: 560 10px/1.2 var(--mono);
  letter-spacing: 0.08em;
}

body:not(.model-home-active) .workspace-surface-switcher,
body:not(.model-home-active) #sheet-tabs {
  border-radius: 3px;
  background: rgba(248, 246, 241, 0.66);
  border-color: rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) .workspace-surface-btn,
body:not(.model-home-active) .sheet-tab,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary {
  border-radius: 3px;
  font-weight: 520;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"],
body:not(.model-home-active) .sheet-tab.active {
  color: rgba(49, 79, 115, 0.96);
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(84, 120, 156, 0.30);
  box-shadow: none;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  border-radius: 3px;
  font-weight: 620;
  box-shadow: none;
}

body.focus-mode-active:not(.model-home-active) #snap-chip,
body.focus-mode-active:not(.model-home-active) #health-chip,
body.focus-mode-active:not(.model-home-active) #manual-actions,
body.focus-mode-active:not(.model-home-active) #btn-schedule-run {
  display: none !important;
}

body.focus-mode-active:not(.model-home-active) #workspace-surface-switcher,
body.focus-mode-active:not(.model-home-active) #dirty-chip,
body.focus-mode-active:not(.model-home-active) #model-run-state-chip {
  pointer-events: none;
  visibility: hidden;
}

body.focus-mode-active:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 0;
}

body.focus-mode-active:not(.model-home-active) #main::before {
  bottom: 0;
}

body.focus-mode-active:not(.model-home-active) #side-panel,
body.focus-mode-active:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  display: none !important;
}

body.zone-mode:not(.model-home-active) {
  --bg: #062A43;
  --shell-bg: #082E4A;
  --bg-grid: #082E4A;
  --bg-header: #0A3654;
  --bg-panel: rgba(6, 42, 67, 0.94);
  --bg-input: rgba(8, 46, 74, 0.96);
  --bg-overlay: rgba(6, 42, 67, 0.96);
  --surface: #082E4A;
  --gridline: rgba(169, 189, 201, 0.26);
  --border: rgba(216, 230, 236, 0.24);
  --fg: rgba(248, 246, 241, 0.90);
  --fg-dim: rgba(216, 230, 236, 0.64);
  --fg-muted: rgba(216, 230, 236, 0.78);
  --accent: #D8E6EC;
  --accent-dark: #F8F6F1;
  --accent-light: rgba(216, 230, 236, 0.18);
  --accent-wash: rgba(216, 230, 236, 0.10);
  --select: #F8F6F1;
  color: var(--fg);
}

body.zone-mode:not(.model-home-active) #audit-overlay {
  background: rgba(2, 14, 24, 0.72);
}

body.zone-mode:not(.model-home-active) #audit-modal {
  border-color: rgba(216, 230, 236, 0.32);
  background: #062A43;
  color: rgba(248, 246, 241, 0.94);
  box-shadow: 0 24px 80px rgba(0, 9, 16, 0.48);
}

body.zone-mode:not(.model-home-active) #audit-header {
  border-bottom-color: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) .audit-section,
body.zone-mode:not(.model-home-active) .audit-pm-summary-header,
body.zone-mode:not(.model-home-active) .audit-method-card,
body.zone-mode:not(.model-home-active) .audit-pre {
  border-color: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) .audit-pm-summary-header,
body.zone-mode:not(.model-home-active) .audit-method-card {
  background: rgba(8, 46, 74, 0.98);
}

body.zone-mode:not(.model-home-active) .audit-pre {
  background: rgba(3, 24, 39, 0.98);
  color: rgba(248, 246, 241, 0.94);
}

body.zone-mode:not(.model-home-active) #app {
  border-color: rgba(216, 230, 236, 0.28);
  background:
    radial-gradient(ellipse at -10% 52%, rgba(84, 120, 156, 0.32), rgba(8, 46, 74, 0.32) 38%, rgba(8, 46, 74, 0) 66%),
    linear-gradient(rgba(216, 230, 236, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 230, 236, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, #062A43 0%, #082E4A 52%, #0A3654 100%);
  background-size: auto, 28px 28px, 28px 28px, auto;
  box-shadow:
    0 20px 54px rgba(3, 22, 36, 0.34),
    inset 0 1px 0 rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #sheet-tabs {
  background: rgba(6, 42, 67, 0.78);
  border-color: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #logo,
body.zone-mode:not(.model-home-active) #runtime-identity,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) .model-name-label,
body.zone-mode:not(.model-home-active) .status-chip,
body.zone-mode:not(.model-home-active) .active-workbook-label,
body.zone-mode:not(.model-home-active) #formula-bar,
body.zone-mode:not(.model-home-active) #cell-addr,
body.zone-mode:not(.model-home-active) .cell-mark-status {
  color: var(--fg);
}

body.zone-mode:not(.model-home-active) .formula-placeholder {
  color: rgba(216, 230, 236, 0.50);
}

body.zone-mode:not(.model-home-active) .topbar-action:disabled,
body.zone-mode:not(.model-home-active) #model-workflow-next-action-button:disabled {
  color: rgba(216, 230, 236, 0.46);
  background: rgba(216, 230, 236, 0.10);
  border-color: rgba(216, 230, 236, 0.14);
}

body.zone-mode:not(.model-home-active) #main {
  border-color: rgba(216, 230, 236, 0.22);
  background:
    linear-gradient(rgba(216, 230, 236, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 230, 236, 0.035) 1px, transparent 1px),
    rgba(6, 42, 67, 0.76);
  background-size: 28px 28px, 28px 28px, auto;
  box-shadow:
    0 14px 30px rgba(3, 22, 36, 0.32),
    inset 0 1px 0 rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #grid-container,
body.zone-mode:not(.model-home-active) #side-panel {
  border-color: rgba(216, 230, 236, 0.24);
  background: #082E4A;
  box-shadow: inset 0 1px 0 rgba(216, 230, 236, 0.08);
}

body.zone-mode:not(.model-home-active) .topbar-action,
body.zone-mode:not(.model-home-active) .manual-actions-summary,
body.zone-mode:not(.model-home-active) .workspace-surface-switcher,
body.zone-mode:not(.model-home-active) .workspace-surface-btn,
body.zone-mode:not(.model-home-active) .sheet-tab,
body.zone-mode:not(.model-home-active) #btn-add-sheet,
body.zone-mode:not(.model-home-active) .version-select {
  color: rgba(216, 230, 236, 0.82);
  border-color: rgba(216, 230, 236, 0.22);
  background: rgba(8, 46, 74, 0.72);
}

body.zone-mode:not(.model-home-active) .workspace-surface-btn.active,
body.zone-mode:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"],
body.zone-mode:not(.model-home-active) .sheet-tab.active {
  color: rgba(248, 246, 241, 0.94);
  background: rgba(216, 230, 236, 0.10);
  border-color: rgba(216, 230, 236, 0.38);
}

body.zone-mode:not(.model-home-active) #model-workflow-next-action-button {
  color: rgba(248, 246, 241, 0.96);
  background: rgba(6, 42, 67, 0.86);
  border-color: rgba(216, 230, 236, 0.54);
}

body.zone-mode:not(.model-home-active) .research-shell-title,
body.zone-mode:not(.model-home-active) .research-shell,
body.zone-mode:not(.model-home-active) .research-shell-prompt-glyph,
body.zone-mode:not(.model-home-active) .research-shell-input {
  color: rgba(248, 246, 241, 0.88);
}
/* ─── IRIS final object-continuity override ─── */

body:not(.model-home-active) #menubar {
  height: 48px;
  min-height: 48px;
  background: rgba(248, 246, 241, 0.84);
}

body:not(.model-home-active) #menubar-left,
body:not(.model-home-active) #menubar-right {
  gap: 0;
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  margin-right: 0;
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .entry-surface-action,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) .status-chip,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  border-left: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #brand-lockup {
  border-left: 0;
  padding-right: 18px;
}

body:not(.model-home-active) .model-name {
  padding: 0 18px;
}

body:not(.model-home-active) #workspace-surface-switcher {
  height: 100%;
  border-top: 0;
  border-bottom: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
  background: transparent;
}

body:not(.model-home-active) .workspace-surface-btn {
  height: 100%;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.12);
  background: transparent;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.78);
}

body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  border-radius: 0;
  box-shadow: none;
}

body:not(.model-home-active) #formulabar {
  background: rgba(248, 246, 241, 0.72);
  border-top: 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #main {
  gap: 0;
  padding: 0;
  border-top: 0;
  border-radius: 3px;
  box-shadow:
    0 10px 22px rgba(49, 79, 115, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.42);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0;
  box-shadow: inset -1px 0 0 rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #side-panel {
  border: 0;
  border-radius: 0;
  background: rgba(248, 246, 241, 0.78);
  box-shadow:
    inset 1px 0 0 rgba(49, 79, 115, 0.18),
    inset 18px 0 0 rgba(216, 230, 236, 0.14);
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 18px;
  border-left: 1px solid rgba(49, 79, 115, 0.10);
}

body:not(.model-home-active) #sheet-tabs {
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0;
}

body:not(.model-home-active) #bottombar {
  position: relative;
  height: 26px;
  min-height: 26px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0 0 4px 4px;
}

body:not(.model-home-active) #bottombar::before {
  content: "";
  position: absolute;
  left: 44%;
  right: 42%;
  top: 50%;
  height: 1px;
  background: rgba(49, 79, 115, 0.16);
  pointer-events: none;
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #side-panel,
body.zone-mode:not(.model-home-active) #bottombar {
  background-image: none;
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .entry-surface-action,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) .workspace-surface-btn,
body.zone-mode:not(.model-home-active) .topbar-model-create,
body.zone-mode:not(.model-home-active) .status-chip,
body.zone-mode:not(.model-home-active) #btn-zone-mode,
body.zone-mode:not(.model-home-active) #snap-chip,
body.zone-mode:not(.model-home-active) #version-select,
body.zone-mode:not(.model-home-active) #btn-product-guide,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) #manual-actions,
body.zone-mode:not(.model-home-active) #grid-container,
body.zone-mode:not(.model-home-active) .research-shell-section,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  border-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #grid-container {
  box-shadow: inset -1px 0 0 rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #side-panel {
  box-shadow:
    inset 1px 0 0 rgba(216, 230, 236, 0.20),
    inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) #bottombar::before {
  background: rgba(216, 230, 236, 0.16);
}

/* ─── IRIS Model Instrument composition slice — authoritative override ─── */

body:not(.model-home-active) #menubar {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(49, 79, 115, 0.05);
}

body:not(.model-home-active) #formulabar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.30);
}

body:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 400px);
  grid-template-rows: minmax(0, 1fr) 64px;
  gap: 0;
  margin: 8px 12px 0;
  padding: 0;
  border: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.92), rgba(243, 240, 234, 0.86)),
    rgba(248, 246, 241, 0.88);
  box-shadow:
    0 14px 28px rgba(49, 79, 115, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

body:not(.model-home-active) #main::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: 63px;
  height: 1px;
  background: rgba(49, 79, 115, 0.22);
  pointer-events: none;
  z-index: 5;
}

body:not(.model-home-active) #main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: none;
  padding: 0;
  -webkit-mask: none;
  mask: none;
  pointer-events: none;
}

body:not(.model-home-active) #primary-work-area {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #side-panel {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.80), rgba(243, 240, 234, 0.72)),
    rgba(248, 246, 241, 0.78);
  box-shadow: inset 18px 0 0 rgba(216, 230, 236, 0.12);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
}

body:not(.model-home-active) #sheet-tabs {
  border: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.20);
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.14), rgba(248, 246, 241, 0.50) 28%, rgba(248, 246, 241, 0.42));
}

body:not(.model-home-active) #instrument-title-block-placeholder {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  min-height: 64px;
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.10), rgba(248, 246, 241, 0.44) 34%, rgba(216, 230, 236, 0.08)),
    rgba(243, 240, 234, 0.70);
  pointer-events: none;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before,
body:not(.model-home-active) #instrument-title-block-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before {
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 21%,
      rgba(49, 79, 115, 0.18) 21%,
      rgba(49, 79, 115, 0.18) calc(21% + 1px),
      transparent calc(21% + 1px),
      transparent 52%,
      rgba(49, 79, 115, 0.18) 52%,
      rgba(49, 79, 115, 0.18) calc(52% + 1px),
      transparent calc(52% + 1px),
      transparent 77%,
      rgba(49, 79, 115, 0.18) 77%,
      rgba(49, 79, 115, 0.18) calc(77% + 1px),
      transparent calc(77% + 1px)),
    linear-gradient(180deg,
      transparent 0,
      transparent 50%,
      rgba(49, 79, 115, 0.14) 50%,
      rgba(49, 79, 115, 0.14) calc(50% + 1px),
      transparent calc(50% + 1px));
}

body:not(.model-home-active) #instrument-title-block-placeholder::after {
  inset: 7px;
  border: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 18px;
  min-height: 100%;
  border-left: 1px solid rgba(49, 79, 115, 0.10);
  border-bottom: 0;
}

body:not(.model-home-active) #bottombar {
  height: 15px;
  min-height: 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.26);
}

body:not(.model-home-active) #bottombar::before {
  display: none;
}

body.zone-mode:not(.model-home-active) #menubar {
  border-bottom-color: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) #formulabar {
  border-bottom-color: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #main {
  border-color: rgba(216, 230, 236, 0.24);
  background:
    linear-gradient(180deg, rgba(10, 50, 78, 0.96), rgba(7, 39, 62, 0.94)),
    rgba(7, 39, 62, 0.94);
  box-shadow:
    0 14px 30px rgba(0, 10, 20, 0.28),
    inset 0 1px 0 rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #main::before {
  background: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #main::after {
  border-color: rgba(216, 230, 236, 0.08);
}

body.zone-mode:not(.model-home-active) #primary-work-area {
  border-right-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #side-panel {
  background:
    linear-gradient(180deg, rgba(10, 50, 78, 0.92), rgba(7, 39, 62, 0.88)),
    rgba(7, 39, 62, 0.88);
  box-shadow: inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) #sheet-tabs {
  border-top-color: rgba(216, 230, 236, 0.22);
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.07), rgba(7, 39, 62, 0.52) 34%, rgba(216, 230, 236, 0.05)),
    rgba(7, 39, 62, 0.54);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder {
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.06), rgba(7, 39, 62, 0.56) 34%, rgba(216, 230, 236, 0.05)),
    rgba(7, 39, 62, 0.66);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::before {
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 21%,
      rgba(216, 230, 236, 0.18) 21%,
      rgba(216, 230, 236, 0.18) calc(21% + 1px),
      transparent calc(21% + 1px),
      transparent 52%,
      rgba(216, 230, 236, 0.18) 52%,
      rgba(216, 230, 236, 0.18) calc(52% + 1px),
      transparent calc(52% + 1px),
      transparent 77%,
      rgba(216, 230, 236, 0.18) 77%,
      rgba(216, 230, 236, 0.18) calc(77% + 1px),
      transparent calc(77% + 1px)),
    linear-gradient(180deg,
      transparent 0,
      transparent 50%,
      rgba(216, 230, 236, 0.13) 50%,
      rgba(216, 230, 236, 0.13) calc(50% + 1px),
      transparent calc(50% + 1px));
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::after {
  border-color: rgba(216, 230, 236, 0.11);
}

body.zone-mode:not(.model-home-active) #bottombar {
  color: rgba(216, 230, 236, 0.28);
}

/* ─── IRIS Blueprint Composition Slice 1 — final authority ─── */

body:not(.model-home-active) #app {
  border-color: rgba(49, 79, 115, 0.28);
  border-radius: 3px;
  background: #F8F6F1;
  box-shadow: none;
  backdrop-filter: none;
}

body:not(.model-home-active) #app::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(49, 79, 115, 0.16);
  pointer-events: none;
  z-index: 0;
}

body:not(.model-home-active) #menubar,
body:not(.model-home-active) #formulabar,
body:not(.model-home-active) #main,
body:not(.model-home-active) #bottombar {
  position: relative;
  z-index: 1;
}

body:not(.model-home-active) #menubar {
  height: 64px;
  min-height: 64px;
  margin: 0 18px;
  padding: 0;
  background: transparent;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow: none;
}

body:not(.model-home-active) #brand-lockup {
  width: 218px;
  padding-left: 20px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #runtime-identity {
  max-width: 96px;
}

body:not(.model-home-active) .entry-surface-action,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) .status-chip,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  border-left: 0;
}

body:not(.model-home-active) .model-name {
  min-width: 250px;
  padding: 0 20px;
  border-right: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) #primary-actions {
  border-right: 1px solid rgba(49, 79, 115, 0.16);
  border-left: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .workspace-surface-btn,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select,
body:not(.model-home-active) #model-workflow-next-action-button {
  border-radius: 0;
  box-shadow: none;
}

body:not(.model-home-active) #formulabar {
  height: 48px;
  min-height: 48px;
  margin: 0 18px;
  padding: 0;
  background: transparent;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow: none;
}

body:not(.model-home-active) #cell-addr,
body:not(.model-home-active) .cell-mark-status,
body:not(.model-home-active) .active-workbook-label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #formula-bar {
  background: transparent;
}

body:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr) clamp(310px, 25vw, 390px);
  grid-template-rows: minmax(0, 1fr) 112px;
  margin: 0 18px;
  border-top: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.22);
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  border-left: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #main::before {
  left: 0;
  right: 0;
  bottom: 111px;
  background: rgba(49, 79, 115, 0.24);
}

body:not(.model-home-active) #main::after {
  border: 0;
}

body:not(.model-home-active) #primary-work-area {
  border-right: 1px solid rgba(49, 79, 115, 0.20);
}

body:not(.model-home-active) #grid-container {
  background: #F8F6F1;
  border: 0;
  box-shadow: none;
}

body:not(.model-home-active) #grid-container:focus-within {
  box-shadow: inset 0 0 0 1px rgba(84, 120, 156, 0.38);
}

body.mode-spreadsheet:not(.zone-mode):not(.model-home-active) #cell-editor {
  background: #F8F6F1;
}

body:not(.model-home-active) #side-panel {
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 0;
  padding: 22px 22px 18px;
  border-left: 0;
  background: transparent;
}

body:not(.model-home-active) .research-shell-head {
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) .research-shell-title {
  letter-spacing: 0.22em;
}

body:not(.model-home-active) #sheet-tabs {
  height: 32px;
  min-height: 32px;
  border-top: 1px solid rgba(49, 79, 115, 0.22);
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) .sheet-tab {
  height: 31px;
  border-top: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.16);
  border-bottom: 0;
  border-left: 0;
  background: transparent;
}

body:not(.model-home-active) .sheet-tab.active {
  background: rgba(248, 246, 241, 0.68);
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.72);
}

body:not(.model-home-active) #instrument-title-block-placeholder {
  min-height: 112px;
  background: transparent;
  border-top: 0;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before {
  top: 0;
  bottom: 0;
  left: 22%;
  width: 1px;
  background: rgba(49, 79, 115, 0.18);
  box-shadow:
    28vw 0 0 rgba(49, 79, 115, 0.18),
    52vw 0 0 rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #instrument-title-block-placeholder::after {
  inset: 0;
  border: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.22);
  box-shadow:
    inset 0 38px 0 -37px rgba(49, 79, 115, 0.14),
    inset 0 74px 0 -73px rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) #bottombar {
  height: 14px;
  min-height: 14px;
  margin: 0 18px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.22);
}

body.zone-mode:not(.model-home-active) #app {
  background: #07334F;
  border-color: rgba(216, 230, 236, 0.28);
  box-shadow: none;
}

body.zone-mode:not(.model-home-active) #app::before {
  border-color: rgba(216, 230, 236, 0.14);
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #main {
  background: transparent;
  border-color: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) #cell-addr,
body.zone-mode:not(.model-home-active) .cell-mark-status,
body.zone-mode:not(.model-home-active) .active-workbook-label,
body.zone-mode:not(.model-home-active) #primary-work-area,
body.zone-mode:not(.model-home-active) .sheet-tab {
  border-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #side-panel,
body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  background: transparent;
}

body.zone-mode:not(.model-home-active) #main::before,
body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::before {
  background: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::before {
  box-shadow:
    28vw 0 0 rgba(216, 230, 236, 0.18),
    52vw 0 0 rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::after {
  border-top-color: rgba(216, 230, 236, 0.22);
  box-shadow:
    inset 0 38px 0 -37px rgba(216, 230, 236, 0.13),
    inset 0 74px 0 -73px rgba(216, 230, 236, 0.11);
}

/* ─── IRIS top rail reference geometry correction — final authority ─── */
body:not(.model-home-active) #brand-lockup {
  align-items: flex-start;
  flex: 0 0 196px;
  flex-direction: column;
  justify-content: center;
  width: 196px;
  padding: 0 18px 0 24px;
  text-align: left;
}

body:not(.model-home-active) #logo {
  display: block;
  font-size: 25px;
  font-weight: 470;
  letter-spacing: 0.24em;
  line-height: 0.9;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  max-width: none;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity .runtime-maker,
body:not(.model-home-active) .model-name-label {
  display: block;
  color: rgba(49, 79, 115, 0.62);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.16em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.model-home-active) .model-name {
  align-items: flex-start;
  flex: 0 0 min(470px, 36vw);
  flex-direction: column;
  justify-content: center;
  min-width: min(470px, 36vw);
  max-width: min(470px, 36vw);
  padding: 0 28px;
  gap: 4px;
  text-align: left;
}

body:not(.model-home-active) .model-name-value {
  color: rgba(31, 54, 79, 0.96);
  font-size: 17px;
  font-weight: 540;
  letter-spacing: 0.025em;
  line-height: 1.05;
  text-align: left;
}

body:not(.model-home-active) .model-name-meta {
  color: rgba(49, 79, 115, 0.58);
  font-size: 8px;
  font-weight: 440;
  letter-spacing: 0.10em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

/* ─── IRIS top rail reference geometry correction — EOF authority ─── */
body:not(.model-home-active) #brand-lockup {
  align-items: flex-start;
  flex: 0 0 196px;
  flex-direction: column;
  justify-content: center;
  width: 196px;
  padding: 0 18px 0 24px;
  text-align: left;
}

body:not(.model-home-active) #logo {
  display: block;
  font-size: 25px;
  font-weight: 470;
  letter-spacing: 0.24em;
  line-height: 0.9;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  max-width: none;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity .runtime-maker,
body:not(.model-home-active) .model-name-label {
  display: block;
  color: rgba(49, 79, 115, 0.62);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.16em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.model-home-active) .model-name {
  align-items: flex-start;
  flex: 0 0 min(470px, 36vw);
  flex-direction: column;
  justify-content: center;
  min-width: min(470px, 36vw);
  max-width: min(470px, 36vw);
  padding: 0 28px;
  gap: 4px;
  text-align: left;
}

body:not(.model-home-active) .model-name-value {
  color: rgba(31, 54, 79, 0.96);
  font-size: 17px;
  font-weight: 540;
  letter-spacing: 0.025em;
  line-height: 1.05;
  text-align: left;
}

body:not(.model-home-active) .model-name-meta {
  color: rgba(49, 79, 115, 0.58);
  font-size: 8px;
  font-weight: 440;
  letter-spacing: 0.10em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

/* ─── IRIS top rail alignment — true EOF authority ─── */
body:not(.model-home-active) #brand-lockup {
  align-items: flex-start;
  flex: 0 0 188px;
  flex-direction: column;
  justify-content: center;
  width: 188px;
  padding: 0 18px 0 24px;
  text-align: left;
}

body:not(.model-home-active) #logo {
  display: block;
  font-size: 25px;
  font-weight: 470;
  letter-spacing: 0.24em;
  line-height: 0.9;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  max-width: none;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity .runtime-maker {
  display: block;
  color: rgba(49, 79, 115, 0.58);
  font-size: 16px;
  font-weight: 640;
  letter-spacing: 0.10em;
  line-height: 1.05;
  text-align: left;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-name-label {
  color: rgba(49, 79, 115, 0.62);
  font-size: 22px;
  font-weight: 640;
  letter-spacing: 0.10em;
  line-height: 1;
  text-align: left;
}

/* ─── IRIS top-left rail correction — final override ─── */
body:not(.model-home-active) #brand-lockup {
  align-items: flex-start;
  flex: 0 0 188px;
  flex-direction: column;
  justify-content: center;
  width: 188px;
  padding: 0 18px 0 22px;
  text-align: left;
}

body:not(.model-home-active) #logo {
  display: block;
  font-size: 25px;
  font-weight: 470;
  letter-spacing: 0.24em;
  line-height: 0.9;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  max-width: none;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity .runtime-maker {
  display: block;
  color: rgba(49, 79, 115, 0.58);
  font-size: 16px;
  font-weight: 640;
  letter-spacing: 0.10em;
  line-height: 1.05;
  text-align: left;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-name-label {
  color: rgba(49, 79, 115, 0.62);
  font-size: 22px;
  font-weight: 640;
  letter-spacing: 0.10em;
  line-height: 1;
  text-align: left;
}

body:not(.model-home-active) .model-name {
  flex: 0 0 min(450px, 35vw);
  min-width: min(450px, 35vw);
  max-width: min(450px, 35vw);
}

/* ─── IRIS Top Rail Reference Correction ─── */
body:not(.model-home-active) #brand-lockup {
  align-self: stretch;
  align-items: flex-start;
  display: flex;
  flex: 0 0 258px;
  flex-direction: column;
  justify-content: center;
  width: 258px;
  padding: 0 24px;
  cursor: pointer;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  outline: none;
}

body:not(.model-home-active) #brand-lockup:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(49, 79, 115, 0.42);
}

body:not(.model-home-active) #logo {
  font-size: 30px;
  font-weight: 470;
  letter-spacing: 0.25em;
  line-height: 0.86;
}

body:not(.model-home-active) #runtime-identity {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 8px;
  max-width: none;
  color: rgba(49, 79, 115, 0.50);
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.19em;
  line-height: 1.15;
  text-align: left;
  text-transform: uppercase;
}

body:not(.model-home-active) #runtime-identity .runtime-maker {
  color: rgba(49, 79, 115, 0.58);
}

body:not(.model-home-active) #runtime-identity .runtime-tagline {
  color: rgba(49, 79, 115, 0.40);
}

body:not(.model-home-active) .entry-surface-action {
  display: none;
}

body:not(.model-home-active) .model-name {
  align-self: stretch;
  align-items: flex-start;
  display: flex;
  flex: 0 0 min(470px, 35vw);
  flex-direction: column;
  justify-content: center;
  min-width: min(470px, 35vw);
  max-width: min(470px, 35vw);
  padding: 0 28px;
  gap: 4px;
  text-align: left;
  border-right: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) .model-name-label {
  display: block;
  width: 100%;
  color: rgba(49, 79, 115, 0.50);
  font-size: 11px;
  font-weight: 560;
  letter-spacing: 0.24em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-name-value {
  display: block;
  width: 100%;
  color: rgba(31, 54, 79, 0.96);
  font-size: 17px;
  font-weight: 540;
  letter-spacing: 0.025em;
  line-height: 1.05;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.model-home-active) .model-name-meta {
  display: block;
  width: 100%;
  color: rgba(49, 79, 115, 0.58);
  font-size: 8px;
  font-weight: 440;
  letter-spacing: 0.10em;
  line-height: 1;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  opacity: 0.82;
}

body.zone-mode:not(.model-home-active) #brand-lockup:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(216, 230, 236, 0.44);
}

body.zone-mode:not(.model-home-active) #runtime-identity .runtime-maker {
  color: rgba(216, 230, 236, 0.64);
}

body.zone-mode:not(.model-home-active) #runtime-identity .runtime-tagline,
body.zone-mode:not(.model-home-active) .model-name-meta {
  color: rgba(216, 230, 236, 0.52);
}

body.zone-mode:not(.model-home-active) .model-name-value {
  color: rgba(238, 247, 246, 0.92);
}

/* ─── IRIS Top Rail Hierarchy Pass ─── */
body:not(.model-home-active) #menubar-left {
  min-width: 0;
}

body:not(.model-home-active) #brand-lockup {
  width: 244px;
  padding-left: 24px;
  cursor: pointer;
  outline: none;
}

body:not(.model-home-active) #brand-lockup:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(49, 79, 115, 0.42);
}

body:not(.model-home-active) #logo {
  font-size: 28px;
  font-weight: 470;
  letter-spacing: 0.24em;
  line-height: 0.92;
}

body:not(.model-home-active) #runtime-identity {
  margin-top: 7px;
  max-width: none;
  color: rgba(49, 79, 115, 0.48);
  font-size: 6px;
  font-weight: 460;
  letter-spacing: 0.20em;
}

body:not(.model-home-active) .entry-surface-action {
  display: none;
}

body:not(.model-home-active) .model-name {
  align-self: stretch;
  display: flex;
  flex: 0 0 min(450px, 34vw);
  flex-direction: column;
  justify-content: center;
  min-width: min(450px, 34vw);
  max-width: min(450px, 34vw);
  padding: 0 24px;
  gap: 5px;
}

body:not(.model-home-active) .model-name-label {
  display: block;
  color: rgba(49, 79, 115, 0.50);
  font-size: 7px;
  font-weight: 430;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-name-value {
  display: block;
  color: rgba(31, 54, 79, 0.94);
  font-size: 17px;
  font-weight: 540;
  letter-spacing: 0.035em;
  line-height: 1.05;
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  opacity: 0.86;
}

body.zone-mode:not(.model-home-active) #brand-lockup:focus-visible {
  box-shadow: inset 0 0 0 1px rgba(216, 230, 236, 0.44);
}

body.zone-mode:not(.model-home-active) .model-name-value {
  color: rgba(238, 247, 246, 0.92);
}

/* ─── IRIS Blueprint Edge Language — plotted drawing perimeter ─── */

body:not(.model-home-active) #app {
  border-color: rgba(49, 79, 115, 0.10);
  border-radius: 2px;
}

body:not(.model-home-active) #app::before {
  --iris-edge-rule: rgba(49, 79, 115, 0.20);
  --iris-edge-tick: rgba(49, 79, 115, 0.24);
  inset: 12px;
  border: 0;
  background:
    linear-gradient(var(--iris-edge-rule), var(--iris-edge-rule)) 34px 0 / calc(100% - 68px) 1px no-repeat,
    linear-gradient(var(--iris-edge-rule), var(--iris-edge-rule)) 34px 100% / calc(100% - 68px) 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-rule), var(--iris-edge-rule)) 0 34px / 1px calc(100% - 68px) no-repeat,
    linear-gradient(90deg, var(--iris-edge-rule), var(--iris-edge-rule)) 100% 34px / 1px calc(100% - 68px) no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 0 18px / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) 18px 0 / 1px 24px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 100% 18px / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) calc(100% - 18px) 0 / 1px 24px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 0 calc(100% - 18px) / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) 18px 100% / 1px 24px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 100% calc(100% - 18px) / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) calc(100% - 18px) 100% / 1px 24px no-repeat;
}

body:not(.model-home-active) #app::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  pointer-events: none;
  --iris-registration: rgba(49, 79, 115, 0.18);
  background:
    linear-gradient(var(--iris-registration), var(--iris-registration)) 0 14px / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) 9px 5px / 1px 18px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 100% 14px / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) calc(100% - 9px) 5px / 1px 18px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 0 calc(100% - 14px) / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) 9px calc(100% - 23px) / 1px 18px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 100% calc(100% - 14px) / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) calc(100% - 9px) calc(100% - 23px) / 1px 18px no-repeat;
}

body.zone-mode:not(.model-home-active) #app {
  border-color: rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #app::before {
  --iris-edge-rule: rgba(216, 230, 236, 0.20);
  --iris-edge-tick: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) #app::after {
  --iris-registration: rgba(216, 230, 236, 0.17);
}

/* ─── IRIS Blueprint Workstation — chrome reduction pass ─── */

body:not(.model-home-active) #menubar {
  border-right-color: rgba(49, 79, 115, 0.10);
  border-bottom-color: rgba(49, 79, 115, 0.12);
  border-left-color: rgba(49, 79, 115, 0.10);
}

body:not(.model-home-active) #menubar::before,
body:not(.model-home-active) #menubar::after {
  opacity: 0.42;
}

body:not(.model-home-active) #formulabar {
  border-right-color: rgba(49, 79, 115, 0.10);
  border-bottom-color: rgba(49, 79, 115, 0.12);
  border-left-color: rgba(49, 79, 115, 0.10);
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions,
body:not(.model-home-active) #cell-addr,
body:not(.model-home-active) .cell-mark-status,
body:not(.model-home-active) .active-workbook-label {
  border-color: rgba(49, 79, 115, 0.09);
}

body:not(.model-home-active) .entry-surface-action,
body:not(.model-home-active) .workspace-surface-btn,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .mark-btn,
body:not(.model-home-active) .version-select,
body:not(.model-home-active) #btn-zone-mode {
  background: transparent;
  border-color: rgba(49, 79, 115, 0.10);
  box-shadow: none;
  color: rgba(49, 79, 115, 0.66);
}

body:not(.model-home-active) .entry-surface-action:hover,
body:not(.model-home-active) .workspace-surface-btn:hover,
body:not(.model-home-active) .topbar-action:hover:not(:disabled),
body:not(.model-home-active) .manual-actions-summary:hover,
body:not(.model-home-active) .mark-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -1px 0 rgba(49, 79, 115, 0.62);
  color: rgba(31, 48, 70, 0.82);
}

body:not(.model-home-active) .status-chip,
body:not(.model-home-active) #snap-chip {
  background: transparent;
  border-color: transparent;
  color: rgba(49, 79, 115, 0.54);
}

body:not(.model-home-active) #model-workflow-next-action-button {
  background: transparent;
  border-color: rgba(49, 79, 115, 0.28);
  color: rgba(31, 48, 70, 0.82);
}

body:not(.model-home-active) #model-workflow-next-action-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(49, 79, 115, 0.36);
}

body:not(.model-home-active) #formula-bar {
  color: rgba(49, 79, 115, 0.58);
}

body:not(.model-home-active) #cell-addr,
body:not(.model-home-active) .cell-mark-status,
body:not(.model-home-active) .active-workbook-label {
  color: rgba(49, 79, 115, 0.62);
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar {
  border-color: rgba(216, 230, 236, 0.13);
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) #manual-actions,
body.zone-mode:not(.model-home-active) #cell-addr,
body.zone-mode:not(.model-home-active) .cell-mark-status,
body.zone-mode:not(.model-home-active) .active-workbook-label {
  border-color: rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) .entry-surface-action,
body.zone-mode:not(.model-home-active) .workspace-surface-btn,
body.zone-mode:not(.model-home-active) .topbar-action,
body.zone-mode:not(.model-home-active) .manual-actions-summary,
body.zone-mode:not(.model-home-active) .mark-btn,
body.zone-mode:not(.model-home-active) .version-select,
body.zone-mode:not(.model-home-active) #btn-zone-mode {
  background: transparent;
  border-color: rgba(216, 230, 236, 0.12);
  color: rgba(216, 230, 236, 0.66);
}

body.zone-mode:not(.model-home-active) .workspace-surface-btn.active,
body.zone-mode:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background: transparent;
  border-color: transparent;
  box-shadow: inset 0 -1px 0 rgba(216, 230, 236, 0.58);
  color: rgba(243, 248, 250, 0.82);
}

body.zone-mode:not(.model-home-active) #model-workflow-next-action-button {
  background: transparent;
  border-color: rgba(216, 230, 236, 0.30);
  color: rgba(243, 248, 250, 0.82);
}

body:not(.model-home-active) #brand-lockup {
  width: 242px;
}

body:not(.model-home-active) #logo {
  font-size: 18px;
  font-weight: 520;
  letter-spacing: 0.20em;
  color: rgba(31, 48, 70, 0.92);
}

body:not(.model-home-active) #runtime-identity {
  margin-top: 3px;
  max-width: 108px;
  color: rgba(49, 79, 115, 0.48);
  font-size: 6.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
}

body.zone-mode:not(.model-home-active) #logo {
  color: rgba(243, 248, 250, 0.88);
}

body.zone-mode:not(.model-home-active) #runtime-identity {
  color: rgba(216, 230, 236, 0.50);
}

/* ─── IRIS Blueprint Calibration Pass ─── */

body:not(.model-home-active) #brand-lockup {
  width: 270px;
  padding-left: 24px;
}

body:not(.model-home-active) #logo {
  font-size: 23px;
  font-weight: 480;
  letter-spacing: 0.22em;
  color: rgba(31, 48, 70, 0.94);
}

body:not(.model-home-active) #runtime-identity {
  margin-top: 4px;
  max-width: 118px;
  color: rgba(49, 79, 115, 0.42);
  font-size: 6px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

body:not(.model-home-active) .model-name {
  min-width: 330px;
  padding: 0 24px;
}

body:not(.model-home-active) .model-name-label {
  display: block;
  margin-bottom: 5px;
  color: rgba(49, 79, 115, 0.46);
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-name-value {
  color: rgba(31, 48, 70, 0.92);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

body:not(.model-home-active) #workspace-surface-switcher {
  margin-left: 6px;
}

body:not(.model-home-active) .workspace-surface-btn {
  color: rgba(49, 79, 115, 0.54);
  font-size: 10px;
  letter-spacing: 0.04em;
}

body:not(.model-home-active) #app::before {
  --iris-edge-rule: rgba(49, 79, 115, 0.16);
  --iris-edge-tick: rgba(49, 79, 115, 0.18);
  inset: 13px;
  background:
    linear-gradient(var(--iris-edge-rule), var(--iris-edge-rule)) 28px 0 / calc(100% - 56px) 1px no-repeat,
    linear-gradient(var(--iris-edge-rule), var(--iris-edge-rule)) 28px 100% / calc(100% - 56px) 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-rule), var(--iris-edge-rule)) 0 28px / 1px calc(100% - 56px) no-repeat,
    linear-gradient(90deg, var(--iris-edge-rule), var(--iris-edge-rule)) 100% 28px / 1px calc(100% - 56px) no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 0 16px / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) 16px 0 / 1px 18px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 100% 16px / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) calc(100% - 16px) 0 / 1px 18px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 0 calc(100% - 16px) / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) 16px 100% / 1px 18px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 100% calc(100% - 16px) / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) calc(100% - 16px) 100% / 1px 18px no-repeat;
}

body:not(.model-home-active) #app::after {
  --iris-registration: rgba(49, 79, 115, 0.12);
  inset: 5px;
  background:
    linear-gradient(var(--iris-registration), var(--iris-registration)) 0 13px / 14px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) 7px 6px / 1px 14px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 100% 13px / 14px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) calc(100% - 7px) 6px / 1px 14px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 0 calc(100% - 13px) / 14px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) 7px calc(100% - 20px) / 1px 14px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 100% calc(100% - 13px) / 14px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) calc(100% - 7px) calc(100% - 20px) / 1px 14px no-repeat;
}

body:not(.model-home-active) #main {
  grid-template-rows: minmax(0, 1fr) 132px;
}

body:not(.model-home-active) #main::before {
  bottom: 131px;
}

body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  min-height: 132px;
}

body:not(.model-home-active) .engineering-title-block-section {
  padding: 10px 13px 9px;
}

body:not(.model-home-active) .engineering-title-block-kicker {
  margin-bottom: 8px;
  color: rgba(49, 79, 115, 0.50);
  letter-spacing: 0.14em;
}

body:not(.model-home-active) .engineering-title-block-row {
  gap: 12px;
  padding: 2px 0;
}

body:not(.model-home-active) .engineering-title-block-label {
  color: rgba(49, 79, 115, 0.40);
  font-size: 8px;
}

body:not(.model-home-active) .engineering-title-block-value {
  color: rgba(31, 48, 70, 0.74);
  font-size: 10px;
}

body.zone-mode:not(.model-home-active) #logo {
  color: rgba(243, 248, 250, 0.88);
}

body.zone-mode:not(.model-home-active) #runtime-identity {
  color: rgba(216, 230, 236, 0.46);
}

body.zone-mode:not(.model-home-active) .model-name-label {
  color: rgba(216, 230, 236, 0.46);
}

body.zone-mode:not(.model-home-active) .model-name-value {
  color: rgba(243, 248, 250, 0.86);
}

body.zone-mode:not(.model-home-active) #app::before {
  --iris-edge-rule: rgba(216, 230, 236, 0.16);
  --iris-edge-tick: rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #app::after {
  --iris-registration: rgba(216, 230, 236, 0.12);
}

body.zone-mode:not(.model-home-active) #main::before {
  bottom: 131px;
}

body:not(.model-home-active) #brand-lockup {
  width: 210px;
}

body:not(.model-home-active) .model-name {
  flex: 0 0 min(330px, 27vw);
  min-width: min(330px, 27vw);
  max-width: min(330px, 27vw);
}

body:not(.model-home-active) #workspace-surface-switcher {
  flex: 0 1 auto;
}

/* ─── IRIS Blueprint Edge Language — plotted drawing perimeter ─── */

body:not(.model-home-active) #app {
  border-color: rgba(49, 79, 115, 0.10);
  border-radius: 2px;
}

body:not(.model-home-active) #app::before {
  --iris-edge-rule: rgba(49, 79, 115, 0.20);
  --iris-edge-tick: rgba(49, 79, 115, 0.24);
  inset: 12px;
  border: 0;
  background:
    linear-gradient(var(--iris-edge-rule), var(--iris-edge-rule)) 34px 0 / calc(100% - 68px) 1px no-repeat,
    linear-gradient(var(--iris-edge-rule), var(--iris-edge-rule)) 34px 100% / calc(100% - 68px) 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-rule), var(--iris-edge-rule)) 0 34px / 1px calc(100% - 68px) no-repeat,
    linear-gradient(90deg, var(--iris-edge-rule), var(--iris-edge-rule)) 100% 34px / 1px calc(100% - 68px) no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 0 18px / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) 18px 0 / 1px 24px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 100% 18px / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) calc(100% - 18px) 0 / 1px 24px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 0 calc(100% - 18px) / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) 18px 100% / 1px 24px no-repeat,
    linear-gradient(var(--iris-edge-tick), var(--iris-edge-tick)) 100% calc(100% - 18px) / 24px 1px no-repeat,
    linear-gradient(90deg, var(--iris-edge-tick), var(--iris-edge-tick)) calc(100% - 18px) 100% / 1px 24px no-repeat;
}

body:not(.model-home-active) #app::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  pointer-events: none;
  --iris-registration: rgba(49, 79, 115, 0.18);
  background:
    linear-gradient(var(--iris-registration), var(--iris-registration)) 0 14px / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) 9px 5px / 1px 18px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 100% 14px / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) calc(100% - 9px) 5px / 1px 18px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 0 calc(100% - 14px) / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) 9px calc(100% - 23px) / 1px 18px no-repeat,
    linear-gradient(var(--iris-registration), var(--iris-registration)) 100% calc(100% - 14px) / 18px 1px no-repeat,
    linear-gradient(90deg, var(--iris-registration), var(--iris-registration)) calc(100% - 9px) calc(100% - 23px) / 1px 18px no-repeat;
}

body.zone-mode:not(.model-home-active) #app {
  border-color: rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #app::before {
  --iris-edge-rule: rgba(216, 230, 236, 0.20);
  --iris-edge-tick: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) #app::after {
  --iris-registration: rgba(216, 230, 236, 0.17);
}

/* ─── IRIS Engineering Title Block Projection Slice ─── */

body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  display: grid;
  grid-template-columns: 1.1fr 1.45fr 1.35fr 1.05fr;
  grid-auto-rows: minmax(0, 1fr);
  min-height: 132px;
  padding: 0;
  pointer-events: auto;
  overflow: hidden;
  font-family: var(--font);
  color: rgba(49, 79, 115, 0.86);
}

body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block::before,
body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block::after {
  display: none;
}

body:not(.model-home-active) .engineering-title-block-section {
  min-width: 0;
  padding: 7px 10px 6px;
  border-top: 1px solid rgba(49, 79, 115, 0.24);
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) .engineering-title-block-section:nth-child(4n) {
  border-right: 0;
}

body:not(.model-home-active) .engineering-title-block-section:nth-child(n + 5) {
  border-top-color: rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) .engineering-title-block-kicker {
  margin-bottom: 5px;
  color: rgba(49, 79, 115, 0.58);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.11em;
  line-height: 1.2;
  text-transform: uppercase;
}

body:not(.model-home-active) .engineering-title-block-row {
  display: grid;
  grid-template-columns: minmax(54px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  padding: 1px 0;
  line-height: 1.24;
}

body:not(.model-home-active) .engineering-title-block-label {
  min-width: 0;
  color: rgba(49, 79, 115, 0.48);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.model-home-active) .engineering-title-block-value {
  min-width: 0;
  color: rgba(31, 48, 70, 0.84);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.model-home-active) .engineering-title-block-section:first-child .engineering-title-block-value:first-of-type {
  font-size: 13px;
  letter-spacing: 0.16em;
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  color: rgba(216, 230, 236, 0.84);
}

body.zone-mode:not(.model-home-active) .engineering-title-block-section {
  border-top-color: rgba(216, 230, 236, 0.22);
  border-right-color: rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) .engineering-title-block-section:nth-child(n + 5) {
  border-top-color: rgba(216, 230, 236, 0.16);
}

body.zone-mode:not(.model-home-active) .engineering-title-block-kicker {
  color: rgba(216, 230, 236, 0.56);
}

body.zone-mode:not(.model-home-active) .engineering-title-block-label {
  color: rgba(216, 230, 236, 0.46);
}

body.zone-mode:not(.model-home-active) .engineering-title-block-value {
  color: rgba(243, 248, 250, 0.82);
}

/* ─── IRIS Model Instrument composition slice ─── */

body:not(.model-home-active) #menubar {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(49, 79, 115, 0.05);
}

body:not(.model-home-active) #formulabar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.30);
}

body:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 400px);
  grid-template-rows: minmax(0, 1fr) 64px;
  gap: 0;
  margin: 8px 12px 0;
  padding: 0;
  border: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.92), rgba(243, 240, 234, 0.86)),
    rgba(248, 246, 241, 0.88);
  box-shadow:
    0 14px 28px rgba(49, 79, 115, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

body:not(.model-home-active) #main::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 63px;
  height: 1px;
  background: rgba(49, 79, 115, 0.22);
  pointer-events: none;
  z-index: 5;
}

body:not(.model-home-active) #main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  pointer-events: none;
}

body:not(.model-home-active) #primary-work-area {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #side-panel {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.80), rgba(243, 240, 234, 0.72)),
    rgba(248, 246, 241, 0.78);
  box-shadow: inset 18px 0 0 rgba(216, 230, 236, 0.12);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-left: 0;
  box-shadow: none;
}

body:not(.model-home-active) #sheet-tabs {
  border: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.20);
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.14), rgba(248, 246, 241, 0.50) 28%, rgba(248, 246, 241, 0.42));
}

body:not(.model-home-active) #instrument-title-block-placeholder {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  min-height: 64px;
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.10), rgba(248, 246, 241, 0.44) 34%, rgba(216, 230, 236, 0.08)),
    rgba(243, 240, 234, 0.70);
  pointer-events: none;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before,
body:not(.model-home-active) #instrument-title-block-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before {
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 21%,
      rgba(49, 79, 115, 0.18) 21%,
      rgba(49, 79, 115, 0.18) calc(21% + 1px),
      transparent calc(21% + 1px),
      transparent 52%,
      rgba(49, 79, 115, 0.18) 52%,
      rgba(49, 79, 115, 0.18) calc(52% + 1px),
      transparent calc(52% + 1px),
      transparent 77%,
      rgba(49, 79, 115, 0.18) 77%,
      rgba(49, 79, 115, 0.18) calc(77% + 1px),
      transparent calc(77% + 1px)),
    linear-gradient(180deg,
      transparent 0,
      transparent 50%,
      rgba(49, 79, 115, 0.14) 50%,
      rgba(49, 79, 115, 0.14) calc(50% + 1px),
      transparent calc(50% + 1px));
}

body:not(.model-home-active) #instrument-title-block-placeholder::after {
  inset: 7px;
  border: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 18px;
  min-height: 100%;
  border-left: 1px solid rgba(49, 79, 115, 0.10);
  border-bottom: 0;
}

body:not(.model-home-active) #bottombar {
  height: 15px;
  min-height: 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.26);
}

body:not(.model-home-active) #bottombar::before {
  display: none;
}

body.zone-mode:not(.model-home-active) #menubar {
  border-bottom-color: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) #formulabar {
  border-bottom-color: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #main {
  border-color: rgba(216, 230, 236, 0.24);
  background:
    linear-gradient(180deg, rgba(10, 50, 78, 0.96), rgba(7, 39, 62, 0.94)),
    rgba(7, 39, 62, 0.94);
  box-shadow:
    0 14px 30px rgba(0, 10, 20, 0.28),
    inset 0 1px 0 rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #main::before {
  background: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #main::after {
  border-color: rgba(216, 230, 236, 0.08);
}

body.zone-mode:not(.model-home-active) #primary-work-area {
  border-right-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #side-panel {
  background:
    linear-gradient(180deg, rgba(10, 50, 78, 0.92), rgba(7, 39, 62, 0.88)),
    rgba(7, 39, 62, 0.88);
  box-shadow: inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) #sheet-tabs {
  border-top-color: rgba(216, 230, 236, 0.22);
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.07), rgba(7, 39, 62, 0.52) 34%, rgba(216, 230, 236, 0.05)),
    rgba(7, 39, 62, 0.54);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder {
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.06), rgba(7, 39, 62, 0.56) 34%, rgba(216, 230, 236, 0.05)),
    rgba(7, 39, 62, 0.66);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::before {
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 21%,
      rgba(216, 230, 236, 0.18) 21%,
      rgba(216, 230, 236, 0.18) calc(21% + 1px),
      transparent calc(21% + 1px),
      transparent 52%,
      rgba(216, 230, 236, 0.18) 52%,
      rgba(216, 230, 236, 0.18) calc(52% + 1px),
      transparent calc(52% + 1px),
      transparent 77%,
      rgba(216, 230, 236, 0.18) 77%,
      rgba(216, 230, 236, 0.18) calc(77% + 1px),
      transparent calc(77% + 1px)),
    linear-gradient(180deg,
      transparent 0,
      transparent 50%,
      rgba(216, 230, 236, 0.13) 50%,
      rgba(216, 230, 236, 0.13) calc(50% + 1px),
      transparent calc(50% + 1px));
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::after {
  border-color: rgba(216, 230, 236, 0.11);
}

body.zone-mode:not(.model-home-active) #bottombar {
  color: rgba(216, 230, 236, 0.28);
}

/* ─── IRIS final object-continuity override ─── */

body:not(.model-home-active) #menubar {
  height: 48px;
  min-height: 48px;
  background: rgba(248, 246, 241, 0.84);
}

body:not(.model-home-active) #menubar-left,
body:not(.model-home-active) #menubar-right {
  gap: 0;
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  margin-right: 0;
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .entry-surface-action,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) .status-chip,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  border-left: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #brand-lockup {
  border-left: 0;
  padding-right: 18px;
}

body:not(.model-home-active) .model-name {
  padding: 0 18px;
}

body:not(.model-home-active) #workspace-surface-switcher {
  height: 100%;
  border-top: 0;
  border-bottom: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
  background: transparent;
}

body:not(.model-home-active) .workspace-surface-btn {
  height: 100%;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.12);
  background: transparent;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.78);
}

body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  border-radius: 0;
  box-shadow: none;
}

body:not(.model-home-active) #formulabar {
  background: rgba(248, 246, 241, 0.72);
  border-top: 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #main {
  gap: 0;
  padding: 0;
  border-top: 0;
  border-radius: 3px;
  box-shadow:
    0 10px 22px rgba(49, 79, 115, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.42);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0;
  box-shadow: inset -1px 0 0 rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #side-panel {
  border: 0;
  border-radius: 0;
  background: rgba(248, 246, 241, 0.78);
  box-shadow:
    inset 1px 0 0 rgba(49, 79, 115, 0.18),
    inset 18px 0 0 rgba(216, 230, 236, 0.14);
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 18px;
  border-left: 1px solid rgba(49, 79, 115, 0.10);
}

body:not(.model-home-active) #sheet-tabs {
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0;
}

body:not(.model-home-active) #bottombar {
  height: 26px;
  min-height: 26px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0 0 4px 4px;
}

body:not(.model-home-active) #bottombar::before {
  content: "";
  position: absolute;
  left: 44%;
  right: 42%;
  top: 50%;
  height: 1px;
  background: rgba(49, 79, 115, 0.16);
  pointer-events: none;
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #side-panel,
body.zone-mode:not(.model-home-active) #bottombar {
  background-image: none;
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .entry-surface-action,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) .workspace-surface-btn,
body.zone-mode:not(.model-home-active) .topbar-model-create,
body.zone-mode:not(.model-home-active) .status-chip,
body.zone-mode:not(.model-home-active) #btn-zone-mode,
body.zone-mode:not(.model-home-active) #snap-chip,
body.zone-mode:not(.model-home-active) #version-select,
body.zone-mode:not(.model-home-active) #btn-product-guide,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) #manual-actions,
body.zone-mode:not(.model-home-active) #grid-container,
body.zone-mode:not(.model-home-active) .research-shell-section,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  border-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #grid-container {
  box-shadow: inset -1px 0 0 rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #side-panel {
  box-shadow:
    inset 1px 0 0 rgba(216, 230, 236, 0.20),
    inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) #bottombar::before {
  background: rgba(216, 230, 236, 0.16);
}

/* ─── IRIS industrial instrument pass ─── */

body:not(.model-home-active) #app {
  padding: 18px;
  border-radius: 6px;
}

body:not(.model-home-active) #menubar {
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  background: rgba(248, 246, 241, 0.84);
  border-bottom-color: rgba(49, 79, 115, 0.18);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.46),
    0 1px 0 rgba(49, 79, 115, 0.08);
}

body:not(.model-home-active) #menubar-left,
body:not(.model-home-active) #menubar-right {
  gap: 0;
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}

body:not(.model-home-active) #brand-lockup {
  width: 232px;
  margin-right: 0;
  padding-right: 18px;
  border-right: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #runtime-identity {
  max-width: 118px;
  white-space: normal;
}

body:not(.model-home-active) .entry-surface-action,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) .status-chip,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  border-left: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) .model-name {
  min-width: 230px;
  max-width: min(470px, 34vw);
  gap: 8px;
  padding: 0 18px;
  margin: 0;
}

body:not(.model-home-active) .model-name-value {
  font-weight: 620;
}

body:not(.model-home-active) #workspace-surface-switcher {
  gap: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.14);
  border-right: 1px solid rgba(49, 79, 115, 0.14);
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) .workspace-surface-btn {
  height: 100%;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(49, 79, 115, 0.72);
  font-weight: 560;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(216, 230, 236, 0.22));
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.78);
}

body:not(.model-home-active) .status-chip,
body:not(.model-home-active) .version-select,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) #primary-actions {
  height: 30px;
  min-height: 30px;
}

body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(49, 79, 115, 0.78);
  padding: 0 13px;
}

body:not(.model-home-active) #primary-actions {
  gap: 0;
  margin-left: 0;
  padding-left: 8px;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  height: 30px;
  min-height: 30px;
  padding: 0 18px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(49, 79, 115, 0.56);
  box-shadow: none;
  color: rgba(49, 79, 115, 0.98);
  letter-spacing: 0.04em;
}

body:not(.model-home-active) #formulabar {
  height: 34px;
  min-height: 34px;
  padding: 0 18px;
  border-top: 0;
  border-bottom-color: rgba(49, 79, 115, 0.18);
  background:
    linear-gradient(90deg, rgba(49, 79, 115, 0.08), rgba(49, 79, 115, 0.035) 38%, rgba(49, 79, 115, 0.08)),
    rgba(248, 246, 241, 0.72);
}

body:not(.model-home-active) #cell-addr,
body:not(.model-home-active) .cell-mark-status,
body:not(.model-home-active) .active-workbook-label {
  border-right: 1px solid rgba(49, 79, 115, 0.13);
}

body:not(.model-home-active) #cell-addr {
  width: 58px;
  color: rgba(49, 79, 115, 0.82);
}

body:not(.model-home-active) .active-workbook-label {
  max-width: 260px;
  padding-left: 14px;
  padding-right: 14px;
  font-weight: 560;
  color: rgba(31, 46, 61, 0.82);
}

body:not(.model-home-active) #formula-bar {
  padding-left: 14px;
}

body:not(.model-home-active) #main {
  gap: 0;
  margin: 0 12px;
  padding: 0;
  border-top: 0;
  border-radius: 3px;
  border-color: rgba(49, 79, 115, 0.20);
  background: rgba(248, 246, 241, 0.76);
  box-shadow:
    0 10px 22px rgba(49, 79, 115, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

body:not(.model-home-active) #main::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 0;
  height: 1px;
  background: rgba(49, 79, 115, 0.18);
  pointer-events: none;
  z-index: 2;
}

body:not(.model-home-active) #main::after {
  border-radius: 3px;
  border-color: rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-right: 0;
  border-radius: 0;
  box-shadow: inset -1px 0 0 rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #grid-container:focus-within {
  box-shadow:
    inset -1px 0 0 rgba(49, 79, 115, 0.16),
    inset 0 0 0 1px rgba(84, 120, 156, 0.25);
}

body:not(.model-home-active) #grid-canvas {
  border-radius: 0;
}

body:not(.model-home-active) #side-panel {
  border: 0;
  border-left: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.34), rgba(248, 246, 241, 0.80) 28px, rgba(248, 246, 241, 0.92));
  box-shadow:
    inset 1px 0 0 rgba(49, 79, 115, 0.18),
    inset 18px 0 0 rgba(216, 230, 236, 0.16);
}

body:not(.model-home-active) .panel-rail-label {
  color: rgba(49, 79, 115, 0.46);
  letter-spacing: 0.16em;
}

body:not(.model-home-active) .research-shell {
  min-height: 100%;
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 18px;
  padding: 18px 18px 18px 16px;
  border-left: 1px solid rgba(49, 79, 115, 0.10);
}

body:not(.model-home-active) .research-shell-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .research-shell-title {
  font-size: 9px;
  font-weight: 520;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

body:not(.model-home-active) .research-shell-prompt-row {
  border: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #sheet-tabs {
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-top-color: rgba(49, 79, 115, 0.20);
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  background: rgba(248, 246, 241, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

body:not(.model-home-active) .sheet-tab {
  height: 24px;
  margin-right: -1px;
  padding: 4px 13px;
  border-radius: 0;
  border: 1px solid rgba(49, 79, 115, 0.14);
  border-bottom: 0;
  background: rgba(248, 246, 241, 0.46);
  color: rgba(49, 79, 115, 0.72);
}

body:not(.model-home-active) .sheet-tab.active {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(49, 79, 115, 0.28);
  box-shadow: inset 0 2px 0 rgba(49, 79, 115, 0.72);
}

body:not(.model-home-active) #bottombar {
  position: relative;
  height: 22px;
  min-height: 22px;
  margin: 0 12px;
  padding: 0 18px;
  justify-content: space-between;
  border-top: 1px solid rgba(49, 79, 115, 0.12);
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0 0 4px 4px;
  color: rgba(49, 79, 115, 0.46);
  background:
    linear-gradient(90deg, rgba(49, 79, 115, 0.06), rgba(49, 79, 115, 0.02) 50%, rgba(49, 79, 115, 0.06)),
    rgba(248, 246, 241, 0.78);
}

body:not(.model-home-active) #bottombar::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 210px;
  height: 1px;
  background: rgba(49, 79, 115, 0.16);
  pointer-events: none;
}

body.zone-mode:not(.model-home-active) #menubar {
  border-bottom-color: rgba(216, 230, 236, 0.22);
  box-shadow:
    inset 0 -1px 0 rgba(216, 230, 236, 0.08),
    0 1px 0 rgba(6, 42, 67, 0.84);
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .entry-surface-action,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) .workspace-surface-btn,
body.zone-mode:not(.model-home-active) .topbar-model-create,
body.zone-mode:not(.model-home-active) .status-chip,
body.zone-mode:not(.model-home-active) #btn-zone-mode,
body.zone-mode:not(.model-home-active) #snap-chip,
body.zone-mode:not(.model-home-active) #version-select,
body.zone-mode:not(.model-home-active) #btn-product-guide,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) #manual-actions,
body.zone-mode:not(.model-home-active) #cell-addr,
body.zone-mode:not(.model-home-active) .cell-mark-status,
body.zone-mode:not(.model-home-active) .active-workbook-label,
body.zone-mode:not(.model-home-active) #grid-container,
body.zone-mode:not(.model-home-active) .research-shell-head,
body.zone-mode:not(.model-home-active) .research-shell-section,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) .sheet-tab,
body.zone-mode:not(.model-home-active) #bottombar {
  border-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) .workspace-surface-btn.active,
body.zone-mode:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background:
    linear-gradient(180deg, rgba(216, 230, 236, 0.16), rgba(216, 230, 236, 0.06));
  box-shadow: inset 0 -2px 0 rgba(216, 230, 236, 0.66);
}

body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #bottombar {
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.08), rgba(216, 230, 236, 0.03) 44%, rgba(216, 230, 236, 0.08)),
    rgba(6, 42, 67, 0.78);
}

body.zone-mode:not(.model-home-active) #main {
  box-shadow:
    0 14px 28px rgba(4, 24, 38, 0.24),
    0 0 0 1px rgba(216, 230, 236, 0.08);
}

body.zone-mode:not(.model-home-active) #main::before {
  background: rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #grid-container {
  box-shadow: inset -1px 0 0 rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #side-panel {
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.08), rgba(6, 42, 67, 0.72) 28px, rgba(6, 42, 67, 0.62));
  box-shadow:
    inset 1px 0 0 rgba(216, 230, 236, 0.20),
    inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) #model-workflow-next-action-button {
  background: rgba(216, 230, 236, 0.08);
  color: rgba(248, 246, 241, 0.96);
  border-color: rgba(216, 230, 236, 0.48);
}

body.zone-mode:not(.model-home-active) .research-shell-prompt-row {
  border-top-color: rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #bottombar::before {
  background: rgba(216, 230, 236, 0.16);
}

/* ─── IRIS precision instrument continuity pass ─── */

body:not(.model-home-active) #app {
  padding: 18px;
}

body:not(.model-home-active) #menubar {
  border-bottom-color: rgba(49, 79, 115, 0.18);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.46),
    0 1px 0 rgba(49, 79, 115, 0.08);
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}

body:not(.model-home-active) #brand-lockup {
  border-right: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) .model-name {
  border-left: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #workspace-surface-switcher {
  gap: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
  background: transparent;
}

body:not(.model-home-active) .workspace-surface-btn {
  height: 100%;
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.12);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(216, 230, 236, 0.24));
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.76);
}

body:not(.model-home-active) #main {
  margin: 0 12px;
  border-radius: 0;
  box-shadow:
    0 14px 28px rgba(49, 79, 115, 0.09),
    0 0 0 1px rgba(255, 255, 255, 0.42);
}

body:not(.model-home-active) #grid-container {
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-right: 0;
  box-shadow: inset -1px 0 0 rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #side-panel {
  border-left: 0;
  background:
    linear-gradient(rgba(49, 79, 115, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 230, 236, 0.32), rgba(248, 246, 241, 0.80) 26px, rgba(248, 246, 241, 0.92));
  background-size: 24px 24px, auto;
  box-shadow:
    inset 1px 0 0 rgba(49, 79, 115, 0.18),
    inset 18px 0 0 rgba(216, 230, 236, 0.18);
}

body:not(.model-home-active) .panel-rail-label {
  color: rgba(49, 79, 115, 0.46);
  letter-spacing: 0.16em;
}

body:not(.model-home-active) .research-shell {
  min-height: 100%;
}

body:not(.model-home-active) .research-shell-section {
  border-left: 1px solid rgba(49, 79, 115, 0.10);
  margin-left: 18px;
  padding-left: 16px;
}

body:not(.model-home-active) .research-shell-title {
  font-size: 10px;
  font-weight: 520;
  letter-spacing: 0.22em;
}

body:not(.model-home-active) .research-shell-prompt-row {
  border: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #sheet-tabs {
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #bottombar {
  margin: 0 12px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0 0 4px 4px;
}

body.zone-mode:not(.model-home-active) #menubar {
  border-bottom-color: rgba(216, 230, 236, 0.22);
  box-shadow:
    inset 0 -1px 0 rgba(216, 230, 236, 0.08),
    0 1px 0 rgba(6, 42, 67, 0.84);
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) .workspace-surface-btn {
  border-color: rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) .workspace-surface-btn.active,
body.zone-mode:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background:
    linear-gradient(180deg, rgba(216, 230, 236, 0.16), rgba(216, 230, 236, 0.06));
  box-shadow: inset 0 -2px 0 rgba(216, 230, 236, 0.66);
}

body.zone-mode:not(.model-home-active) #main {
  box-shadow:
    0 14px 28px rgba(4, 24, 38, 0.24),
    0 0 0 1px rgba(216, 230, 236, 0.08);
}

body.zone-mode:not(.model-home-active) #grid-container {
  border-left-color: rgba(216, 230, 236, 0.22);
  box-shadow: inset -1px 0 0 rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #side-panel {
  background:
    linear-gradient(rgba(216, 230, 236, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 230, 236, 0.08), rgba(6, 42, 67, 0.72) 28px, rgba(6, 42, 67, 0.62));
  background-size: 24px 24px, auto;
  box-shadow:
    inset 1px 0 0 rgba(216, 230, 236, 0.20),
    inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) .research-shell-section,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  border-color: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) .research-shell-prompt-row {
  border-top-color: rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) .research-shell-input::placeholder {
  color: rgba(216, 230, 236, 0.46);
}

/* ─── IRIS model artifact refinement pass ─── */

body:not(.model-home-active) #app {
  border-radius: 6px;
}

body:not(.model-home-active) #menubar {
  height: 48px;
  min-height: 48px;
  padding: 0 18px;
  background:
    linear-gradient(rgba(84, 120, 156, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(84, 120, 156, 0.012) 1px, transparent 1px),
    rgba(248, 246, 241, 0.82);
  background-size: 24px 24px, 24px 24px, auto;
}

body:not(.model-home-active) #menubar-left {
  gap: 10px;
}

body:not(.model-home-active) #brand-lockup {
  align-self: stretch;
  align-items: center;
  padding-right: 18px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #runtime-identity {
  max-width: 118px;
  white-space: normal;
}

body:not(.model-home-active) .model-name {
  align-self: stretch;
  align-items: center;
  padding: 0 16px 0 2px;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #workspace-surface-switcher {
  height: 30px;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.14);
  border-right: 1px solid rgba(49, 79, 115, 0.14);
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) .workspace-surface-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: 0;
  border: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.12);
  color: rgba(49, 79, 115, 0.72);
  font: 560 10px/1 var(--font);
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.82);
}

body:not(.model-home-active) #menubar-right {
  gap: 7px;
}

body:not(.model-home-active) .status-chip {
  font-weight: 500;
}

body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  min-height: 26px;
  border-radius: 2px;
  background: rgba(248, 246, 241, 0.48);
  box-shadow: none;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  min-height: 28px;
  border-radius: 2px;
  background: transparent;
  color: #314F73;
  border-color: rgba(49, 79, 115, 0.62);
  letter-spacing: 0.04em;
}

body:not(.model-home-active) #formulabar {
  height: 32px;
  min-height: 32px;
  padding: 0 18px;
  border-top: 1px solid rgba(49, 79, 115, 0.08);
}

body:not(.model-home-active) .active-workbook-label {
  font-weight: 560;
  color: rgba(31, 46, 61, 0.82);
}

body:not(.model-home-active) #cell-addr,
body:not(.model-home-active) .cell-mark-status {
  color: rgba(49, 79, 115, 0.76);
}

body:not(.model-home-active) #main {
  margin: 0 12px;
  padding: 0;
  gap: 0;
  border-radius: 3px;
  border-color: rgba(49, 79, 115, 0.20);
  background: rgba(248, 246, 241, 0.74);
  box-shadow:
    0 8px 20px rgba(49, 79, 115, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

body:not(.model-home-active) #main::after {
  border-radius: 3px;
  border-color: rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0;
  box-shadow: none;
}

body:not(.model-home-active) #grid-container:focus-within {
  box-shadow: inset 0 0 0 1px rgba(84, 120, 156, 0.26);
}

body:not(.model-home-active) #grid-canvas {
  border-radius: 0;
}

body:not(.model-home-active) #side-panel {
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(rgba(84, 120, 156, 0.012) 1px, transparent 1px),
    rgba(248, 246, 241, 0.66);
  background-size: 24px 24px, auto;
}

body:not(.model-home-active) .research-shell-section {
  padding: 18px 17px;
}

body:not(.model-home-active) .research-shell-head {
  margin-bottom: 20px;
}

body:not(.model-home-active) .research-shell-title {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body:not(.model-home-active) .research-shell-input {
  font-size: 12px;
}

body:not(.model-home-active) #sheet-tabs {
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-top: 1px solid rgba(49, 79, 115, 0.18);
  background: rgba(248, 246, 241, 0.78);
}

body:not(.model-home-active) .sheet-tab {
  height: 24px;
  padding: 4px 13px;
  border-radius: 0;
  border: 1px solid rgba(49, 79, 115, 0.14);
  border-bottom: 0;
  background: rgba(248, 246, 241, 0.46);
  color: rgba(49, 79, 115, 0.72);
}

body:not(.model-home-active) .sheet-tab.active {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(49, 79, 115, 0.28);
  box-shadow: inset 0 2px 0 rgba(49, 79, 115, 0.72);
}

body:not(.model-home-active) #bottombar {
  height: 20px;
  min-height: 20px;
  padding: 0 18px;
  border-top: 1px solid rgba(49, 79, 115, 0.12);
  color: rgba(49, 79, 115, 0.46);
  background: rgba(248, 246, 241, 0.72);
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  background:
    linear-gradient(rgba(216, 230, 236, 0.026) 1px, transparent 1px),
    rgba(6, 42, 67, 0.78);
  background-size: 24px 24px, auto;
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) .workspace-surface-btn,
body.zone-mode:not(.model-home-active) #grid-container,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) .sheet-tab,
body.zone-mode:not(.model-home-active) #bottombar {
  border-color: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #side-panel {
  background:
    linear-gradient(rgba(216, 230, 236, 0.026) 1px, transparent 1px),
    rgba(6, 42, 67, 0.62);
  background-size: 24px 24px, auto;
}

body.zone-mode:not(.model-home-active) #grid-container {
  border-right: 1px solid rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) .sheet-tab.active,
body.zone-mode:not(.model-home-active) .workspace-surface-btn.active,
body.zone-mode:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  box-shadow: inset 0 2px 0 rgba(248, 246, 241, 0.66);
}

/* ─── IRIS instrument rail continuity pass ─── */

body:not(.model-home-active) #menubar {
  height: 46px;
  min-height: 46px;
  padding: 0 18px;
}

body:not(.model-home-active) #menubar-left,
body:not(.model-home-active) #menubar-right {
  gap: 0;
}

body:not(.model-home-active) #brand-lockup {
  width: 232px;
  margin-right: 14px;
}

body:not(.model-home-active) .model-name {
  min-width: 230px;
  max-width: min(470px, 34vw);
  padding-right: 18px;
  margin-right: 10px;
}

body:not(.model-home-active) .model-name-value {
  font-weight: 620;
}

body:not(.model-home-active) .status-chip,
body:not(.model-home-active) .version-select,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) #primary-actions {
  height: 30px;
  min-height: 30px;
}

body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(49, 79, 115, 0.78);
  padding: 0 13px;
}

body:not(.model-home-active) .topbar-action:hover:not(:disabled),
body:not(.model-home-active) .manual-actions-summary:hover,
body:not(.model-home-active) .version-select:hover {
  background: rgba(255, 255, 255, 0.36);
  border-color: rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #btn-zone-mode[aria-pressed="true"] {
  background: rgba(216, 230, 236, 0.52);
}

body:not(.model-home-active) #primary-actions {
  gap: 0;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #model-workflow-next-action-button {
  height: 30px;
  min-height: 30px;
  padding: 0 18px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.36);
  border: 1px solid rgba(49, 79, 115, 0.54);
  color: rgba(49, 79, 115, 0.98);
}

body:not(.model-home-active) #model-workflow-next-action-button:hover:not(:disabled) {
  background: rgba(216, 230, 236, 0.44);
  border-color: rgba(49, 79, 115, 0.70);
}

body:not(.model-home-active) #btn-schedule-run {
  border-left: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #formulabar {
  height: 34px;
  min-height: 34px;
  padding: 0 18px;
  border-top: 0;
  background:
    linear-gradient(90deg, rgba(49, 79, 115, 0.08), rgba(49, 79, 115, 0.04) 36%, rgba(49, 79, 115, 0.08)),
    rgba(248, 246, 241, 0.70);
}

body:not(.model-home-active) #cell-addr {
  width: 58px;
  border-right: 1px solid rgba(49, 79, 115, 0.16);
  color: rgba(49, 79, 115, 0.82);
}

body:not(.model-home-active) .cell-mark-status,
body:not(.model-home-active) .active-workbook-label {
  border-right: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .active-workbook-label {
  max-width: 260px;
  padding-left: 14px;
  padding-right: 14px;
}

body:not(.model-home-active) #formula-bar {
  padding-left: 14px;
}

body:not(.model-home-active) #main {
  margin: 0 12px;
  border-top: 0;
}

body:not(.model-home-active) #main::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 0;
  height: 1px;
  background: rgba(49, 79, 115, 0.18);
  pointer-events: none;
  z-index: 2;
}

body:not(.model-home-active) #grid-container {
  border-right: 1px solid rgba(49, 79, 115, 0.20);
}

body:not(.model-home-active) #side-panel {
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.44);
}

body:not(.model-home-active) .research-shell-section {
  padding: 18px 18px 18px 16px;
}

body:not(.model-home-active) .research-shell-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .research-shell-prompt-row {
  padding-top: 2px;
}

body:not(.model-home-active) .research-shell-input {
  color: rgba(31, 46, 61, 0.88);
}

body:not(.model-home-active) #sheet-tabs {
  border-top-color: rgba(49, 79, 115, 0.20);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

body:not(.model-home-active) .sheet-tab {
  margin-right: -1px;
}

body:not(.model-home-active) #bottombar {
  justify-content: space-between;
  background:
    linear-gradient(90deg, rgba(49, 79, 115, 0.06), rgba(49, 79, 115, 0.02) 50%, rgba(49, 79, 115, 0.06)),
    rgba(248, 246, 241, 0.78);
}

body.zone-mode:not(.model-home-active) .topbar-action,
body.zone-mode:not(.model-home-active) .manual-actions-summary,
body.zone-mode:not(.model-home-active) .version-select,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) .cell-mark-status,
body.zone-mode:not(.model-home-active) .active-workbook-label,
body.zone-mode:not(.model-home-active) #cell-addr,
body.zone-mode:not(.model-home-active) #grid-container,
body.zone-mode:not(.model-home-active) .research-shell-head {
  border-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #bottombar {
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.08), rgba(216, 230, 236, 0.03) 44%, rgba(216, 230, 236, 0.08)),
    rgba(6, 42, 67, 0.78);
}

body.zone-mode:not(.model-home-active) #model-workflow-next-action-button {
  background: rgba(216, 230, 236, 0.08);
  color: rgba(248, 246, 241, 0.96);
  border-color: rgba(216, 230, 236, 0.48);
}

body.zone-mode:not(.model-home-active) #main::before {
  background: rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #side-panel {
  box-shadow: inset 1px 0 0 rgba(216, 230, 236, 0.08);
}

body.zone-mode:not(.model-home-active) .research-shell-input {
  color: rgba(248, 246, 241, 0.88);
}

/* ─── IRIS final object-continuity override ─── */

body:not(.model-home-active) #menubar {
  height: 48px;
  min-height: 48px;
  background: rgba(248, 246, 241, 0.84);
}

body:not(.model-home-active) #menubar-left,
body:not(.model-home-active) #menubar-right {
  gap: 0;
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  margin-right: 0;
}

body:not(.model-home-active) #brand-lockup,
body:not(.model-home-active) .entry-surface-action,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) .status-chip,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  border-left: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #brand-lockup {
  border-left: 0;
  padding-right: 18px;
}

body:not(.model-home-active) .model-name {
  padding: 0 18px;
}

body:not(.model-home-active) #workspace-surface-switcher {
  height: 100%;
  border-top: 0;
  border-bottom: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
  background: transparent;
}

body:not(.model-home-active) .workspace-surface-btn {
  height: 100%;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-left: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.12);
  background: transparent;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.78);
}

body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  border-radius: 0;
  box-shadow: none;
}

body:not(.model-home-active) #formulabar {
  background: rgba(248, 246, 241, 0.72);
  border-top: 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #main {
  gap: 0;
  padding: 0;
  border-top: 0;
  border-radius: 3px;
  box-shadow:
    0 10px 22px rgba(49, 79, 115, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.42);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0;
  box-shadow: inset -1px 0 0 rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #side-panel {
  border: 0;
  border-radius: 0;
  background: rgba(248, 246, 241, 0.78);
  box-shadow:
    inset 1px 0 0 rgba(49, 79, 115, 0.18),
    inset 18px 0 0 rgba(216, 230, 236, 0.14);
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 18px;
  border-left: 1px solid rgba(49, 79, 115, 0.10);
}

body:not(.model-home-active) #sheet-tabs {
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0;
}

body:not(.model-home-active) #bottombar {
  position: relative;
  height: 26px;
  min-height: 26px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  border-radius: 0 0 4px 4px;
}

body:not(.model-home-active) #bottombar::before {
  content: "";
  position: absolute;
  left: 44%;
  right: 42%;
  top: 50%;
  height: 1px;
  background: rgba(49, 79, 115, 0.16);
  pointer-events: none;
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #side-panel,
body.zone-mode:not(.model-home-active) #bottombar {
  background-image: none;
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .entry-surface-action,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) .workspace-surface-btn,
body.zone-mode:not(.model-home-active) .topbar-model-create,
body.zone-mode:not(.model-home-active) .status-chip,
body.zone-mode:not(.model-home-active) #btn-zone-mode,
body.zone-mode:not(.model-home-active) #snap-chip,
body.zone-mode:not(.model-home-active) #version-select,
body.zone-mode:not(.model-home-active) #btn-product-guide,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) #manual-actions,
body.zone-mode:not(.model-home-active) #grid-container,
body.zone-mode:not(.model-home-active) .research-shell-section,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  border-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #grid-container {
  box-shadow: inset -1px 0 0 rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #side-panel {
  box-shadow:
    inset 1px 0 0 rgba(216, 230, 236, 0.20),
    inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) #bottombar::before {
  background: rgba(216, 230, 236, 0.16);
}
/* ─── IRIS Model Instrument composition slice — EOF authority ─── */

body:not(.model-home-active) #menubar {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    inset 0 -1px 0 rgba(49, 79, 115, 0.05);
}

body:not(.model-home-active) #formulabar {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.30);
}

body:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 400px);
  grid-template-rows: minmax(0, 1fr) 64px;
  gap: 0;
  margin: 8px 12px 0;
  padding: 0;
  border: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.92), rgba(243, 240, 234, 0.86)),
    rgba(248, 246, 241, 0.88);
  box-shadow:
    0 14px 28px rgba(49, 79, 115, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.46);
}

body:not(.model-home-active) #main::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: 63px;
  height: 1px;
  background: rgba(49, 79, 115, 0.22);
  pointer-events: none;
  z-index: 5;
}

body:not(.model-home-active) #main::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: none;
  padding: 0;
  -webkit-mask: none;
  mask: none;
  pointer-events: none;
}

body:not(.model-home-active) #primary-work-area {
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #side-panel {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  border-left: 0;
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.80), rgba(243, 240, 234, 0.72)),
    rgba(248, 246, 241, 0.78);
  box-shadow: inset 18px 0 0 rgba(216, 230, 236, 0.12);
}

body:not(.model-home-active) #grid-container {
  border: 0;
  border-left: 0;
  border-right: 0;
  box-shadow: none;
}

body:not(.model-home-active) #sheet-tabs {
  border: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.20);
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.14), rgba(248, 246, 241, 0.50) 28%, rgba(248, 246, 241, 0.42));
}

body:not(.model-home-active) #instrument-title-block-placeholder {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  min-height: 64px;
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.10), rgba(248, 246, 241, 0.44) 34%, rgba(216, 230, 236, 0.08)),
    rgba(243, 240, 234, 0.70);
  pointer-events: none;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before,
body:not(.model-home-active) #instrument-title-block-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before {
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 21%,
      rgba(49, 79, 115, 0.18) 21%,
      rgba(49, 79, 115, 0.18) calc(21% + 1px),
      transparent calc(21% + 1px),
      transparent 52%,
      rgba(49, 79, 115, 0.18) 52%,
      rgba(49, 79, 115, 0.18) calc(52% + 1px),
      transparent calc(52% + 1px),
      transparent 77%,
      rgba(49, 79, 115, 0.18) 77%,
      rgba(49, 79, 115, 0.18) calc(77% + 1px),
      transparent calc(77% + 1px)),
    linear-gradient(180deg,
      transparent 0,
      transparent 50%,
      rgba(49, 79, 115, 0.14) 50%,
      rgba(49, 79, 115, 0.14) calc(50% + 1px),
      transparent calc(50% + 1px));
}

body:not(.model-home-active) #instrument-title-block-placeholder::after {
  inset: 7px;
  border: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 18px;
  min-height: 100%;
  border-left: 1px solid rgba(49, 79, 115, 0.10);
  border-bottom: 0;
}

body:not(.model-home-active) #bottombar {
  height: 15px;
  min-height: 15px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.26);
}

body:not(.model-home-active) #bottombar::before {
  display: none;
}

body.zone-mode:not(.model-home-active) #menubar {
  border-bottom-color: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) #formulabar {
  border-bottom-color: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #main {
  border-color: rgba(216, 230, 236, 0.24);
  background:
    linear-gradient(180deg, rgba(10, 50, 78, 0.96), rgba(7, 39, 62, 0.94)),
    rgba(7, 39, 62, 0.94);
  box-shadow:
    0 14px 30px rgba(0, 10, 20, 0.28),
    inset 0 1px 0 rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) #main::before {
  background: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #main::after {
  border-color: rgba(216, 230, 236, 0.08);
}

body.zone-mode:not(.model-home-active) #primary-work-area {
  border-right-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #side-panel {
  background:
    linear-gradient(180deg, rgba(10, 50, 78, 0.92), rgba(7, 39, 62, 0.88)),
    rgba(7, 39, 62, 0.88);
  box-shadow: inset 18px 0 0 rgba(216, 230, 236, 0.04);
}

body.zone-mode:not(.model-home-active) #sheet-tabs {
  border-top-color: rgba(216, 230, 236, 0.22);
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.07), rgba(7, 39, 62, 0.52) 34%, rgba(216, 230, 236, 0.05)),
    rgba(7, 39, 62, 0.54);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder {
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.06), rgba(7, 39, 62, 0.56) 34%, rgba(216, 230, 236, 0.05)),
    rgba(7, 39, 62, 0.66);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::before {
  background:
    linear-gradient(90deg,
      transparent 0,
      transparent 21%,
      rgba(216, 230, 236, 0.18) 21%,
      rgba(216, 230, 236, 0.18) calc(21% + 1px),
      transparent calc(21% + 1px),
      transparent 52%,
      rgba(216, 230, 236, 0.18) 52%,
      rgba(216, 230, 236, 0.18) calc(52% + 1px),
      transparent calc(52% + 1px),
      transparent 77%,
      rgba(216, 230, 236, 0.18) 77%,
      rgba(216, 230, 236, 0.18) calc(77% + 1px),
      transparent calc(77% + 1px)),
    linear-gradient(180deg,
      transparent 0,
      transparent 50%,
      rgba(216, 230, 236, 0.13) 50%,
      rgba(216, 230, 236, 0.13) calc(50% + 1px),
      transparent calc(50% + 1px));
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::after {
  border-color: rgba(216, 230, 236, 0.11);
}

body.zone-mode:not(.model-home-active) #bottombar {
  color: rgba(216, 230, 236, 0.28);
}
/* ─── IRIS Blueprint Composition Slice 1 — final EOF authority ─── */

body:not(.model-home-active) #app {
  border-color: rgba(49, 79, 115, 0.28);
  border-radius: 3px;
  background: #F8F6F1;
  box-shadow: none;
  backdrop-filter: none;
}

body:not(.model-home-active) #app::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(49, 79, 115, 0.16);
  pointer-events: none;
  z-index: 0;
}

body:not(.model-home-active) #menubar,
body:not(.model-home-active) #formulabar,
body:not(.model-home-active) #main,
body:not(.model-home-active) #bottombar {
  position: relative;
  z-index: 1;
}

body:not(.model-home-active) #menubar {
  height: 64px;
  min-height: 64px;
  margin: 0 18px;
  padding: 0;
  background: transparent;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow: none;
}

body:not(.model-home-active) #brand-lockup {
  width: 218px;
  padding-left: 20px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #runtime-identity {
  max-width: 96px;
}

body:not(.model-home-active) .entry-surface-action,
body:not(.model-home-active) .model-name,
body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) .status-chip,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide,
body:not(.model-home-active) #primary-actions,
body:not(.model-home-active) #manual-actions {
  border-left: 0;
}

body:not(.model-home-active) .model-name {
  min-width: 250px;
  padding: 0 20px;
  border-right: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) #primary-actions {
  border-right: 1px solid rgba(49, 79, 115, 0.16);
  border-left: 1px solid rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .workspace-surface-btn,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select,
body:not(.model-home-active) #model-workflow-next-action-button {
  border-radius: 0;
  box-shadow: none;
}

body:not(.model-home-active) #formulabar {
  height: 48px;
  min-height: 48px;
  margin: 0 18px;
  padding: 0;
  background: transparent;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  border-left: 1px solid rgba(49, 79, 115, 0.18);
  box-shadow: none;
}

body:not(.model-home-active) #cell-addr,
body:not(.model-home-active) .cell-mark-status,
body:not(.model-home-active) .active-workbook-label {
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  border-right: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) #formula-bar {
  background: transparent;
}

body:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr) clamp(310px, 25vw, 390px);
  grid-template-rows: minmax(0, 1fr) 112px;
  margin: 0 18px;
  border-top: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.22);
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  border-left: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #main::before {
  left: 0;
  right: 0;
  bottom: 111px;
  background: rgba(49, 79, 115, 0.24);
}

body:not(.model-home-active) #main::after {
  border: 0;
}

body:not(.model-home-active) #primary-work-area {
  border-right: 1px solid rgba(49, 79, 115, 0.20);
}

body:not(.model-home-active) #grid-container {
  background: #F8F6F1;
  border: 0;
  box-shadow: none;
}

body:not(.model-home-active) #grid-container:focus-within {
  box-shadow: inset 0 0 0 1px rgba(84, 120, 156, 0.38);
}

body.mode-spreadsheet:not(.zone-mode):not(.model-home-active) #cell-editor {
  background: #F8F6F1;
}

body:not(.model-home-active) #side-panel {
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) .research-shell-section {
  margin-left: 0;
  padding: 22px 22px 18px;
  border-left: 0;
  background: transparent;
}

body:not(.model-home-active) .research-shell-head {
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
}

body:not(.model-home-active) .research-shell-title {
  letter-spacing: 0.22em;
}

body:not(.model-home-active) #sheet-tabs {
  height: 32px;
  min-height: 32px;
  border-top: 1px solid rgba(49, 79, 115, 0.22);
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) .sheet-tab {
  height: 31px;
  border-top: 0;
  border-right: 1px solid rgba(49, 79, 115, 0.16);
  border-bottom: 0;
  border-left: 0;
  background: transparent;
}

body:not(.model-home-active) .sheet-tab.active {
  background: rgba(248, 246, 241, 0.68);
  box-shadow: inset 0 -2px 0 rgba(49, 79, 115, 0.72);
}

body:not(.model-home-active) #instrument-title-block-placeholder {
  min-height: 112px;
  background: transparent;
  border-top: 0;
}

body:not(.model-home-active) #instrument-title-block-placeholder::before {
  top: 0;
  bottom: 0;
  left: 22%;
  width: 1px;
  background: rgba(49, 79, 115, 0.18);
  box-shadow:
    28vw 0 0 rgba(49, 79, 115, 0.18),
    52vw 0 0 rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) #instrument-title-block-placeholder::after {
  inset: 0;
  border: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.22);
  box-shadow:
    inset 0 38px 0 -37px rgba(49, 79, 115, 0.14),
    inset 0 74px 0 -73px rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) #bottombar {
  height: 14px;
  min-height: 14px;
  margin: 0 18px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.22);
}

body.zone-mode:not(.model-home-active) #app {
  background: #07334F;
  border-color: rgba(216, 230, 236, 0.28);
  box-shadow: none;
}

body.zone-mode:not(.model-home-active) #app::before {
  border-color: rgba(216, 230, 236, 0.14);
}

body.zone-mode:not(.model-home-active) #menubar,
body.zone-mode:not(.model-home-active) #formulabar,
body.zone-mode:not(.model-home-active) #main {
  background: transparent;
  border-color: rgba(216, 230, 236, 0.24);
}

body.zone-mode:not(.model-home-active) #brand-lockup,
body.zone-mode:not(.model-home-active) .model-name,
body.zone-mode:not(.model-home-active) #workspace-surface-switcher,
body.zone-mode:not(.model-home-active) #primary-actions,
body.zone-mode:not(.model-home-active) #cell-addr,
body.zone-mode:not(.model-home-active) .cell-mark-status,
body.zone-mode:not(.model-home-active) .active-workbook-label,
body.zone-mode:not(.model-home-active) #primary-work-area,
body.zone-mode:not(.model-home-active) .sheet-tab {
  border-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) #side-panel,
body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder,
body.zone-mode:not(.model-home-active) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  background: transparent;
}

body.zone-mode:not(.model-home-active) #main::before,
body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::before {
  background: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::before {
  box-shadow:
    28vw 0 0 rgba(216, 230, 236, 0.18),
    52vw 0 0 rgba(216, 230, 236, 0.18);
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder::after {
  border-top-color: rgba(216, 230, 236, 0.22);
  box-shadow:
    inset 0 38px 0 -37px rgba(216, 230, 236, 0.13),
    inset 0 74px 0 -73px rgba(216, 230, 236, 0.11);
}
/* ─── IRIS top rail reference geometry correction — final EOF authority ─── */
body:not(.model-home-active) #brand-lockup {
  align-items: flex-start;
  flex: 0 0 196px;
  flex-direction: column;
  justify-content: center;
  width: 196px;
  padding: 0 18px 0 24px;
  text-align: left;
}

body:not(.model-home-active) #logo {
  display: block;
  font-size: 25px;
  font-weight: 470;
  letter-spacing: 0.24em;
  line-height: 0.9;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  max-width: none;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity .runtime-maker,
body:not(.model-home-active) .model-name-label {
  display: block;
  color: rgba(49, 79, 115, 0.62);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.16em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.model-home-active) .model-name {
  align-items: flex-start;
  flex: 0 0 min(470px, 36vw);
  flex-direction: column;
  justify-content: center;
  min-width: min(470px, 36vw);
  max-width: min(470px, 36vw);
  padding: 0 28px;
  gap: 4px;
  text-align: left;
}

body:not(.model-home-active) .model-name-value {
  color: rgba(31, 54, 79, 0.96);
  font-size: 17px;
  font-weight: 540;
  letter-spacing: 0.025em;
  line-height: 1.05;
  text-align: left;
}

body:not(.model-home-active) .model-name-meta {
  color: rgba(49, 79, 115, 0.58);
  font-size: 8px;
  font-weight: 440;
  letter-spacing: 0.10em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
}
/* ─── IRIS industrial calibration — proportional EOF pass ─── */
body:not(.model-home-active) #menubar {
  height: 58px;
  min-height: 58px;
}

body:not(.model-home-active) #brand-lockup {
  flex: 0 0 190px;
  width: 190px;
  padding-left: 24px;
  padding-right: 14px;
}

body:not(.model-home-active) #logo {
  font-size: 24px;
  letter-spacing: 0.235em;
}

body:not(.model-home-active) #runtime-identity {
  margin-top: 7px;
}

body:not(.model-home-active) #runtime-identity .runtime-maker,
body:not(.model-home-active) .model-name-label {
  color: rgba(49, 79, 115, 0.56);
  font-size: 9px;
  font-weight: 540;
  letter-spacing: 0.15em;
}

body:not(.model-home-active) .model-name {
  flex: 0 0 min(452px, 35vw);
  min-width: min(452px, 35vw);
  max-width: min(452px, 35vw);
  padding-left: 24px;
  padding-right: 22px;
}

body:not(.model-home-active) .model-name-value {
  font-size: 16px;
  font-weight: 540;
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #manual-actions,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide {
  opacity: 0.68;
}

body:not(.model-home-active) #primary-actions {
  opacity: 0.92;
}

body:not(.model-home-active) .workspace-surface-btn,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  min-height: 28px;
  padding-right: 10px;
  padding-left: 10px;
  border-color: rgba(49, 79, 115, 0.14);
  color: rgba(49, 79, 115, 0.72);
  font-size: 10px;
  font-weight: 520;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"],
body:not(.model-home-active) .sheet-tab.active {
  box-shadow: inset 0 -1px 0 rgba(49, 79, 115, 0.62);
}

body:not(.model-home-active) #formulabar {
  height: 44px;
  min-height: 44px;
}

body:not(.model-home-active) #cell-addr,
body:not(.model-home-active) .cell-mark-status,
body:not(.model-home-active) .active-workbook-label {
  padding-right: 12px;
  padding-left: 12px;
  color: rgba(49, 79, 115, 0.68);
}

body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  column-gap: 0;
  row-gap: 0;
  padding: 8px 10px;
}

body:not(.model-home-active) .engineering-title-block-section {
  padding: 5px 10px;
}

body:not(.model-home-active) .engineering-title-block-kicker {
  margin-bottom: 6px;
  color: rgba(49, 79, 115, 0.58);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.17em;
}

body:not(.model-home-active) .engineering-title-block-row {
  gap: 8px;
  min-height: 15px;
}

body:not(.model-home-active) .engineering-title-block-label,
body:not(.model-home-active) .engineering-title-block-value {
  font-size: 10px;
  line-height: 1.1;
}
/* ─── IRIS title block legibility correction — EOF authority ─── */
body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  padding: 10px 10px;
}

body:not(.model-home-active) .engineering-title-block-section {
  padding: 7px 10px;
}

body:not(.model-home-active) .engineering-title-block-kicker {
  margin-bottom: 7px;
  line-height: 1.15;
}

body:not(.model-home-active) .engineering-title-block-row {
  gap: 8px;
  min-height: 17px;
}

body:not(.model-home-active) .engineering-title-block-label,
body:not(.model-home-active) .engineering-title-block-value {
  line-height: 1.25;
}
/* ─── IRIS title block proportional repair — EOF authority ─── */
body:not(.model-home-active) #main {
  grid-template-rows: minmax(0, 1fr) 148px;
}

body:not(.model-home-active) #main::before {
  bottom: 147px;
}

body:not(.model-home-active) #instrument-title-block-placeholder,
body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  min-height: 148px;
  max-height: 148px;
  overflow: hidden;
  padding: 12px 12px;
}

body:not(.model-home-active) .engineering-title-block-section {
  padding: 8px 12px;
}

body:not(.model-home-active) .engineering-title-block-kicker {
  margin-bottom: 8px;
  line-height: 1.2;
}

body:not(.model-home-active) .engineering-title-block-row {
  min-height: 18px;
}

body:not(.model-home-active) .engineering-title-block-label,
body:not(.model-home-active) .engineering-title-block-value {
  line-height: 1.28;
}

/* ─── IRIS instrument material calibration — final EOF authority ─── */
body:not(.model-home-active) #app {
  background:
    linear-gradient(180deg, rgba(255, 254, 250, 0.76) 0%, rgba(243, 240, 232, 0.78) 100%),
    #F8F6F1;
}

body:not(.model-home-active) #menubar,
body:not(.model-home-active) #formulabar,
body:not(.model-home-active) #sheet-tabs,
body:not(.model-home-active) #bottombar,
body:not(.model-home-active) #side-panel,
body:not(.model-home-active) #instrument-title-block-placeholder {
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.46) 0%, rgba(236, 235, 227, 0.30) 100%),
    rgba(248, 246, 241, 0.72);
}

body:not(.model-home-active) #grid-container,
body:not(.model-home-active) #grid-canvas {
  background: #F8F6F1;
}

body:not(.model-home-active) #menubar {
  height: 58px;
  min-height: 58px;
}

body:not(.model-home-active) #brand-lockup {
  flex: 0 0 190px;
  width: 190px;
  padding-left: 24px;
  padding-right: 14px;
}

body:not(.model-home-active) #logo {
  font-size: 24px;
  letter-spacing: 0.235em;
}

body:not(.model-home-active) #runtime-identity .runtime-maker,
body:not(.model-home-active) .model-name-label {
  color: rgba(49, 79, 115, 0.54);
  font-size: 9px;
  font-weight: 540;
  letter-spacing: 0.15em;
}

body:not(.model-home-active) .model-name {
  flex: 0 0 min(452px, 35vw);
  min-width: min(452px, 35vw);
  max-width: min(452px, 35vw);
  padding-left: 24px;
  padding-right: 22px;
}

body:not(.model-home-active) .model-name-value {
  font-size: 16px;
  font-weight: 540;
}

body:not(.model-home-active) .workspace-surface-btn,
body:not(.model-home-active) .topbar-action,
body:not(.model-home-active) .manual-actions-summary,
body:not(.model-home-active) .version-select {
  min-height: 28px;
  padding-right: 10px;
  padding-left: 10px;
  border-color: rgba(49, 79, 115, 0.12);
  color: rgba(49, 79, 115, 0.66);
  font-size: 10px;
  font-weight: 500;
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #manual-actions,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select,
body:not(.model-home-active) #btn-product-guide {
  opacity: 0.64;
}

body:not(.model-home-active) #primary-actions {
  opacity: 0.94;
}

body:not(.model-home-active) .workspace-surface-btn.active,
body:not(.model-home-active) .workspace-surface-btn[aria-pressed="true"],
body:not(.model-home-active) .sheet-tab.active {
  box-shadow: inset 0 -1px 0 rgba(49, 79, 115, 0.58);
}

body:not(.model-home-active) #formulabar {
  height: 44px;
  min-height: 44px;
}

body:not(.model-home-active) .research-shell-section {
  color: rgba(31, 48, 70, 0.78);
}

body:not(.model-home-active) .research-shell-title {
  color: rgba(49, 79, 115, 0.66);
  font-weight: 520;
}

body:not(.model-home-active) #main {
  grid-template-rows: minmax(0, 1fr) 220px;
}

body:not(.model-home-active) #main::before {
  bottom: 219px;
}

body:not(.model-home-active) #instrument-title-block-placeholder,
body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  min-height: 220px;
  max-height: 220px;
  overflow: hidden;
  padding: 13px 12px;
}

body:not(.model-home-active) .engineering-title-block-section {
  padding: 9px 12px;
}

body:not(.model-home-active) .engineering-title-block-kicker {
  margin-bottom: 8px;
  color: rgba(49, 79, 115, 0.54);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
  line-height: 1.2;
}

body:not(.model-home-active) .engineering-title-block-row {
  min-height: 17px;
}

body:not(.model-home-active) .engineering-title-block-label {
  color: rgba(49, 79, 115, 0.44);
  font-size: 8.5px;
}

body:not(.model-home-active) .engineering-title-block-value {
  color: rgba(31, 48, 70, 0.78);
  font-size: 9.5px;
}

/* ─── IRIS Model State Ledger — orientation block EOF authority ─── */
body:not(.model-home-active) #main {
  grid-template-rows: minmax(0, 1fr) 220px;
}

body:not(.model-home-active) #main::before {
  bottom: 219px;
}

body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  display: grid;
  grid-template-columns: 1.05fr 1.65fr 1.22fr 1.38fr 1.62fr 1.08fr;
  grid-template-rows: 1fr;
  min-height: 220px;
  max-height: 220px;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.46) 0%, rgba(236, 235, 227, 0.30) 100%),
    rgba(248, 246, 241, 0.72);
  border-top: 1px solid rgba(49, 79, 115, 0.22);
  color: rgba(31, 48, 70, 0.78);
}

body:not(.model-home-active) .model-state-ledger-plate,
body:not(.model-home-active) .model-state-ledger-identity,
body:not(.model-home-active) .model-state-ledger-authority,
body:not(.model-home-active) .model-state-ledger-notes,
body:not(.model-home-active) .model-state-ledger-run-ledger,
body:not(.model-home-active) .model-state-ledger-approval {
  min-width: 0;
  padding: 16px 14px;
  border-right: 1px solid rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) .model-state-ledger-approval {
  border-right: 0;
}

body:not(.model-home-active) .model-state-ledger-plate {
  display: grid;
  grid-template-rows: 88px 1fr;
  align-items: center;
  justify-items: center;
  text-align: center;
}

body:not(.model-home-active) .model-state-ledger-rm-mark {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border: 1px solid rgba(49, 79, 115, 0.34);
  border-radius: 50%;
  color: rgba(49, 79, 115, 0.62);
  font-family: Georgia, serif;
  font-size: 34px;
  letter-spacing: 0.04em;
}

body:not(.model-home-active) .model-state-ledger-maker {
  display: grid;
  gap: 7px;
  color: rgba(49, 79, 115, 0.60);
  font-size: 9px;
  letter-spacing: 0.14em;
  line-height: 1.25;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-state-ledger-maker strong {
  font-size: 10px;
  font-weight: 620;
}

body:not(.model-home-active) .model-state-ledger-kicker {
  margin-bottom: 12px;
  color: rgba(49, 79, 115, 0.56);
  font-size: 9px;
  font-weight: 560;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-state-ledger-model-name {
  margin-bottom: 18px;
  color: rgba(31, 48, 70, 0.84);
  font-size: 17px;
  font-weight: 560;
  letter-spacing: 0.02em;
  line-height: 1.18;
}

body:not(.model-home-active) .model-state-ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
}

body:not(.model-home-active) .model-state-ledger-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

body:not(.model-home-active) .model-state-ledger-label {
  color: rgba(49, 79, 115, 0.46);
  font-size: 8px;
  font-weight: 520;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.model-home-active) .model-state-ledger-value {
  min-width: 0;
  overflow: hidden;
  color: rgba(31, 48, 70, 0.80);
  font-size: 11px;
  font-weight: 430;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.model-home-active) .model-state-ledger-authority,
body:not(.model-home-active) .model-state-ledger-notes,
body:not(.model-home-active) .model-state-ledger-approval {
  display: grid;
  align-content: start;
  gap: 12px;
}

body:not(.model-home-active) .model-state-ledger-note {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.12);
  color: rgba(31, 48, 70, 0.76);
  font-size: 11px;
  letter-spacing: 0.02em;
  line-height: 1.25;
}

body:not(.model-home-active) .model-state-ledger-run-ledger {
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
}

body:not(.model-home-active) .model-state-ledger-run-head,
body:not(.model-home-active) .model-state-ledger-run-row {
  display: grid;
  grid-template-columns: 0.62fr 1.15fr minmax(0, 1.8fr) 0.8fr;
  min-width: 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.14);
}

body:not(.model-home-active) .model-state-ledger-run-head span,
body:not(.model-home-active) .model-state-ledger-run-row span {
  min-width: 0;
  padding: 8px 8px 7px 0;
  overflow: hidden;
  border-right: 1px solid rgba(49, 79, 115, 0.10);
  color: rgba(31, 48, 70, 0.74);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.model-home-active) .model-state-ledger-run-head span {
  color: rgba(49, 79, 115, 0.52);
  font-size: 8px;
  font-weight: 560;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-state-ledger-run-head span:last-child,
body:not(.model-home-active) .model-state-ledger-run-row span:last-child {
  border-right: 0;
}

body:not(.model-home-active) .model-state-ledger-next {
  color: rgba(31, 48, 70, 0.84);
  font-size: 18px;
  font-weight: 560;
  letter-spacing: 0.02em;
  line-height: 1.18;
}

body:not(.model-home-active) .model-state-ledger-next-detail {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(49, 79, 115, 0.14);
  color: rgba(49, 79, 115, 0.56);
  font-size: 10px;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

/* ─── IRIS Model State Ledger visual calibration — EOF authority ─── */
body:not(.model-home-active) #main {
  grid-template-rows: minmax(0, 1fr) 194px;
}

body:not(.model-home-active) #main::before {
  bottom: 193px;
}

body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  grid-template-columns: 0.80fr 1.58fr 1.08fr 1.12fr 2.24fr 0.82fr;
  min-height: 194px;
  max-height: 194px;
  background:
    linear-gradient(180deg, rgba(255, 255, 252, 0.34) 0%, rgba(235, 233, 225, 0.24) 100%),
    rgba(248, 246, 241, 0.62);
  border-top-color: rgba(49, 79, 115, 0.18);
}

body:not(.model-home-active) .model-state-ledger-plate,
body:not(.model-home-active) .model-state-ledger-identity,
body:not(.model-home-active) .model-state-ledger-authority,
body:not(.model-home-active) .model-state-ledger-notes,
body:not(.model-home-active) .model-state-ledger-run-ledger,
body:not(.model-home-active) .model-state-ledger-approval {
  padding: 11px 12px;
  border-right-color: rgba(49, 79, 115, 0.13);
}

body:not(.model-home-active) .model-state-ledger-plate {
  grid-template-rows: 58px 1fr;
  align-items: start;
  padding-top: 12px;
}

body:not(.model-home-active) .model-state-ledger-rm-mark {
  width: 52px;
  height: 52px;
  border-color: rgba(49, 79, 115, 0.25);
  color: rgba(49, 79, 115, 0.50);
  font-size: 25px;
}

body:not(.model-home-active) .model-state-ledger-maker {
  gap: 5px;
  color: rgba(49, 79, 115, 0.48);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  line-height: 1.18;
}

body:not(.model-home-active) .model-state-ledger-maker strong {
  font-size: 8px;
  font-weight: 560;
}

body:not(.model-home-active) .model-state-ledger-kicker {
  margin-bottom: 9px;
  color: rgba(49, 79, 115, 0.47);
  font-size: 7.5px;
  font-weight: 520;
  letter-spacing: 0.18em;
}

body:not(.model-home-active) .model-state-ledger-model-name {
  margin-bottom: 13px;
  color: rgba(31, 48, 70, 0.78);
  font-size: 15px;
  font-weight: 540;
}

body:not(.model-home-active) .model-state-ledger-grid {
  gap: 10px 14px;
}

body:not(.model-home-active) .model-state-ledger-field {
  gap: 4px;
}

body:not(.model-home-active) .model-state-ledger-label {
  color: rgba(49, 79, 115, 0.38);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.15em;
}

body:not(.model-home-active) .model-state-ledger-value {
  color: rgba(31, 48, 70, 0.70);
  font-size: 10px;
}

body:not(.model-home-active) .model-state-ledger-authority,
body:not(.model-home-active) .model-state-ledger-notes,
body:not(.model-home-active) .model-state-ledger-approval {
  gap: 9px;
}

body:not(.model-home-active) .model-state-ledger-approval .model-state-ledger-kicker {
  color: rgba(49, 79, 115, 0.34);
}

body:not(.model-home-active) .model-state-ledger-note {
  padding-bottom: 6px;
  border-bottom-color: rgba(49, 79, 115, 0.10);
  color: rgba(31, 48, 70, 0.66);
  font-size: 10px;
}

body:not(.model-home-active) .model-state-ledger-run-head,
body:not(.model-home-active) .model-state-ledger-run-row {
  grid-template-columns: 0.48fr 1.08fr minmax(0, 2.55fr) 0.62fr;
  border-bottom-color: rgba(49, 79, 115, 0.12);
}

body:not(.model-home-active) .model-state-ledger-run-head span,
body:not(.model-home-active) .model-state-ledger-run-row span {
  padding: 6px 7px 5px 0;
  border-right-color: rgba(49, 79, 115, 0.08);
  color: rgba(31, 48, 70, 0.66);
  font-size: 9px;
}

body:not(.model-home-active) .model-state-ledger-run-head span {
  color: rgba(49, 79, 115, 0.44);
  font-size: 7px;
  font-weight: 540;
  letter-spacing: 0.14em;
}

body:not(.model-home-active) .model-state-ledger-next {
  appearance: none;
  -webkit-appearance: none;
  align-items: center;
  background: rgba(49, 79, 115, 0.07);
  border: 1px solid rgba(49, 79, 115, 0.42);
  color: rgba(20, 33, 38, 0.98);
  cursor: pointer;
  display: inline-flex;
  font-size: 14px;
  font-weight: 650;
  justify-content: center;
  letter-spacing: 0.04em;
  line-height: 1;
  min-height: 32px;
  padding: 7px 12px 6px;
  text-align: center;
  text-transform: uppercase;
  width: auto;
}

body:not(.model-home-active) .model-state-ledger-approval .model-workflow-next-action-button:hover:not(:disabled) {
  background: rgba(49, 79, 115, 0.10);
  border-color: rgba(49, 79, 115, 0.56);
  color: rgba(20, 33, 38, 1);
  text-decoration: none;
}

body:not(.model-home-active) .model-state-ledger-approval .model-workflow-next-action-button:disabled {
  background: rgba(49, 79, 115, 0.04);
  border-color: rgba(49, 79, 115, 0.20);
  color: rgba(49, 79, 115, 0.42);
  cursor: default;
}

body:not(.model-home-active) .model-state-ledger-next-detail {
  margin-top: 4px;
  padding-top: 9px;
  border-top-color: rgba(49, 79, 115, 0.07);
  color: rgba(49, 79, 115, 0.27);
  font-size: 8.5px;
}

body.zone-mode:not(.model-home-active) .model-state-ledger-approval .model-state-ledger-kicker {
  color: rgba(216, 230, 236, 0.42);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-next {
  background: rgba(216, 230, 236, 0.06);
  border-color: rgba(236, 248, 252, 0.48);
  color: rgba(249, 253, 255, 0.98);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-approval .model-workflow-next-action-button:hover:not(:disabled) {
  background: rgba(216, 230, 236, 0.09);
  border-color: rgba(249, 253, 255, 0.62);
  color: rgba(255, 255, 255, 1);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-next-detail {
  border-top-color: rgba(216, 230, 236, 0.08);
  color: rgba(216, 230, 236, 0.28);
}

/* ─── IRIS open-model nameplate size parity with Search ─── */
body:not(.model-home-active) #logo {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.42em;
  line-height: 0.9;
}

/* ─── IRIS nameplate vertical guide alignment ─── */
body:not(.model-home-active) #brand-lockup {
  justify-content: center;
  padding-top: 4px;
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) .topbar-model-create,
body:not(.model-home-active) #dirty-chip,
body:not(.model-home-active) #model-run-state-chip {
  align-self: flex-start;
  margin-top: 30px;
}

body:not(.model-home-active) #topbar-view-controls {
  align-items: center;
  align-self: stretch;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-left: auto;
  min-width: max-content;
}

body:not(.model-home-active) #runtime-identity {
  margin-top: -2px;
  line-height: 1;
}

body:not(.model-home-active) #runtime-identity .runtime-maker {
  line-height: 1;
}

/* ─── Research Shell scroll + transcript content repair ─── */
body:not(.model-home-active) .research-shell-section {
  display: flex;
  flex-direction: column;
}

body:not(.model-home-active) .research-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body:not(.model-home-active) .research-shell-transcript {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  overscroll-behavior: contain;
}

body:not(.model-home-active) .research-shell-transcript ul,
body:not(.model-home-active) .research-shell-transcript ol {
  margin: 4px 0;
  padding-left: 24px;
  list-style-position: outside;
  overflow: visible;
}

body:not(.model-home-active) .research-shell-transcript li {
  padding-left: 2px;
  overflow: visible;
}

/* ─── IRIS Light Workbook Stage 3 — off-sheet document surface integration ─── */
body:not(.zone-mode):not(.model-home-active) #formulabar {
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.74), rgba(242, 239, 232, 0.42)),
    rgba(248, 246, 241, 0.58);
  border-right-color: rgba(49, 79, 115, 0.16);
  border-bottom-color: rgba(49, 79, 115, 0.18);
  border-left-color: rgba(49, 79, 115, 0.16);
}

body:not(.zone-mode):not(.model-home-active) #cell-addr,
body:not(.zone-mode):not(.model-home-active) .cell-mark-status,
body:not(.zone-mode):not(.model-home-active) .active-workbook-label {
  border-right-color: rgba(49, 79, 115, 0.11);
  background: rgba(248, 246, 241, 0.28);
}

body:not(.zone-mode):not(.model-home-active) #formula-bar {
  background: transparent;
  color: rgba(31, 48, 70, 0.78);
}

body:not(.zone-mode):not(.model-home-active) #main {
  background:
    linear-gradient(90deg, rgba(216, 230, 236, 0.035) 0, rgba(216, 230, 236, 0) 22%),
    rgba(248, 246, 241, 0.18);
  border-right-color: rgba(49, 79, 115, 0.18);
  border-bottom-color: rgba(49, 79, 115, 0.20);
  border-left-color: rgba(49, 79, 115, 0.18);
}

body:not(.zone-mode):not(.model-home-active) #main::before {
  background: rgba(49, 79, 115, 0.18);
}

body:not(.zone-mode):not(.model-home-active) #primary-work-area {
  border-right-color: rgba(49, 79, 115, 0.14);
}

body:not(.zone-mode):not(.model-home-active) #side-panel {
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.54), rgba(243, 240, 234, 0.30)),
    rgba(248, 246, 241, 0.34);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.32);
}

body:not(.zone-mode):not(.model-home-active) .research-shell-section {
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.32), rgba(248, 246, 241, 0) 62%);
  border-left: 1px solid rgba(49, 79, 115, 0.075);
  color: rgba(31, 48, 70, 0.74);
}

body:not(.zone-mode):not(.model-home-active) .research-shell-head {
  border-bottom-color: rgba(49, 79, 115, 0.12);
}

body:not(.zone-mode):not(.model-home-active) .research-shell-title {
  color: rgba(49, 79, 115, 0.62);
}

body:not(.zone-mode):not(.model-home-active) .research-shell-prompt-row {
  border-top: 1px solid rgba(49, 79, 115, 0.08);
  border-bottom: 1px solid rgba(49, 79, 115, 0.08);
  background: rgba(248, 246, 241, 0.28);
}

body:not(.zone-mode):not(.model-home-active) .research-shell-input {
  background: transparent;
}

body:not(.zone-mode):not(.model-home-active) #sheet-tabs {
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.56), rgba(242, 239, 232, 0.34)),
    rgba(248, 246, 241, 0.46);
  border-top-color: rgba(49, 79, 115, 0.18);
}

body:not(.zone-mode):not(.model-home-active) .sheet-tab {
  border-right-color: rgba(49, 79, 115, 0.12);
  color: rgba(49, 79, 115, 0.58);
}

body:not(.zone-mode):not(.model-home-active) .sheet-tab.active {
  background: rgba(248, 246, 241, 0.82);
  color: rgba(49, 79, 115, 0.86);
  box-shadow: inset 0 -1px 0 rgba(49, 79, 115, 0.52);
}

body:not(.zone-mode):not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  background:
    linear-gradient(180deg, rgba(248, 246, 241, 0.68), rgba(242, 239, 232, 0.42)),
    rgba(248, 246, 241, 0.64);
  border-top-color: rgba(49, 79, 115, 0.18);
}

body:not(.zone-mode):not(.model-home-active) .model-state-ledger-plate,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-identity,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-authority,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-notes,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-run-ledger,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-approval {
  border-right-color: rgba(49, 79, 115, 0.11);
}

body:not(.zone-mode):not(.model-home-active) .model-state-ledger-note,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-run-head,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-run-row {
  border-bottom-color: rgba(49, 79, 115, 0.09);
}

body:not(.zone-mode):not(.model-home-active) .model-state-ledger-run-head span,
body:not(.zone-mode):not(.model-home-active) .model-state-ledger-run-row span {
  border-right-color: rgba(49, 79, 115, 0.065);
}

body:not(.zone-mode):not(.model-home-active) #bottombar {
  background: rgba(248, 246, 241, 0.42);
  border-top: 1px solid rgba(49, 79, 115, 0.10);
}

/* ─── Governed action relocation: ledger action + Focus retention ─── */
.model-workflow-state-field .model-workflow-next-action-button {
  background: rgba(49, 79, 115, 0.10);
  border: 1px solid rgba(49, 79, 115, 0.38);
  border-radius: 4px;
  box-shadow: none;
  color: rgba(31, 42, 46, 0.96);
  cursor: pointer;
  display: inline-flex;
  font-family: var(--font);
  font-size: 10.5px;
  font-weight: 760;
  height: auto;
  justify-content: center;
  line-height: 1.2;
  min-height: 24px;
  min-width: 0;
  overflow: hidden;
  padding: 4px 8px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.model-workflow-state-field .model-workflow-next-action-button:hover:not(:disabled) {
  background: rgba(49, 79, 115, 0.16);
  border-color: rgba(49, 79, 115, 0.54);
  color: rgba(20, 33, 38, 1);
}

.model-workflow-state-field .model-workflow-next-action-button:disabled {
  background: rgba(92, 108, 114, 0.10);
  border-color: rgba(31, 42, 46, 0.12);
  color: rgba(80, 96, 103, 0.60);
  cursor: default;
}

.model-workflow-state-field .model-workflow-next-action-button[aria-busy="true"] {
  background: rgba(49, 79, 115, 0.18);
  border-color: rgba(49, 79, 115, 0.44);
}

body.focus-mode-active:not(.model-home-active) #side-panel {
  background: transparent;
  border: 0;
  bottom: 14px;
  box-shadow: none;
  display: block !important;
  height: auto;
  max-width: min(380px, calc(100vw - 28px));
  min-height: 0;
  overflow: visible;
  position: fixed;
  right: 14px;
  top: auto;
  width: min(380px, calc(100vw - 28px));
  z-index: 60;
}

body.focus-mode-active:not(.model-home-active) #side-panel > :not(:has(#model-workflow-next-action-button)),
body.focus-mode-active:not(.model-home-active) #side-panel .artifact-review-section,
body.focus-mode-active:not(.model-home-active) #side-panel .run-readiness-items,
body.focus-mode-active:not(.model-home-active) #side-panel .run-lifecycle-summary,
body.focus-mode-active:not(.model-home-active) #side-panel .run-context-line,
body.focus-mode-active:not(.model-home-active) #side-panel .workflow-state-title {
  display: none !important;
}

body.focus-mode-active:not(.model-home-active) #side-panel .panel-section:has(#model-workflow-next-action-button),
body.focus-mode-active:not(.model-home-active) #side-panel .tab-content:has(#model-workflow-next-action-button),
body.focus-mode-active:not(.model-home-active) #side-panel .results-surface,
body.focus-mode-active:not(.model-home-active) #side-panel .run-activity-section,
body.focus-mode-active:not(.model-home-active) #side-panel #workflow-state-strip,
body.focus-mode-active:not(.model-home-active) #side-panel #model-workflow-state-summary {
  display: block !important;
}

body.focus-mode-active:not(.model-home-active) #side-panel .results-surface,
body.focus-mode-active:not(.model-home-active) #side-panel .run-activity-section,
body.focus-mode-active:not(.model-home-active) #side-panel #workflow-state-strip {
  background: transparent;
  border: 0;
  box-shadow: none;
  margin: 0;
  min-height: 0;
  padding: 0;
}

body.focus-mode-active:not(.model-home-active) #side-panel #model-workflow-state-summary {
  grid-template-columns: 1fr;
}

body.focus-mode-active:not(.model-home-active) #side-panel .model-workflow-state-field:first-child {
  display: none;
}

/* ─── Blueprint/Paper Research Shell output contrast ─── */
body.zone-mode:not(.model-home-active) .research-shell-entry-body,
body.zone-mode:not(.model-home-active) .research-shell-entry-local,
body.zone-mode:not(.model-home-active) .research-shell-entry-local * {
  color: rgba(248, 246, 241, 0.94);
}

body.zone-mode:not(.model-home-active) .research-shell-entry-meta,
body.zone-mode:not(.model-home-active) .research-shell-entry-provenance {
  color: rgba(216, 230, 236, 0.76);
}

/* ─── IRIS Title Block Blueprint Visual Material — final authority ─── */
body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  --iris-title-block-surface: #07334F;
  --iris-title-block-line-strong: rgba(236, 248, 252, 0.38);
  --iris-title-block-line: rgba(216, 230, 236, 0.22);
  --iris-title-block-line-soft: rgba(216, 230, 236, 0.14);
  --iris-title-block-label: rgba(216, 230, 236, 0.58);
  --iris-title-block-value: rgba(249, 253, 255, 0.88);
  --iris-title-block-value-soft: rgba(236, 248, 252, 0.72);
  --iris-title-block-detail: rgba(216, 230, 236, 0.42);
  background: var(--iris-title-block-surface);
  border-top-color: var(--iris-title-block-line);
  color: var(--iris-title-block-value-soft);
}

body.zone-mode:not(.model-home-active) #main::before {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block::after {
  background: none !important;
  border: 0 !important;
  border-top-color: transparent !important;
  box-shadow: none !important;
  content: none !important;
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block::before {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
}

body.zone-mode:not(.model-home-active) .model-state-ledger-plate,
body.zone-mode:not(.model-home-active) .model-state-ledger-identity,
body.zone-mode:not(.model-home-active) .model-state-ledger-authority,
body.zone-mode:not(.model-home-active) .model-state-ledger-notes,
body.zone-mode:not(.model-home-active) .model-state-ledger-run-ledger,
body.zone-mode:not(.model-home-active) .model-state-ledger-approval {
  border-right-color: var(--iris-title-block-line);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-rm-mark {
  border-color: var(--iris-title-block-line-strong);
  color: rgba(249, 253, 255, 0.72);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-maker {
  color: var(--iris-title-block-label);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-kicker,
body.zone-mode:not(.model-home-active) .model-state-ledger-label,
body.zone-mode:not(.model-home-active) .model-state-ledger-run-head span {
  color: var(--iris-title-block-label);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-model-name,
body.zone-mode:not(.model-home-active) .model-state-ledger-value {
  color: var(--iris-title-block-value);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-note,
body.zone-mode:not(.model-home-active) .model-state-ledger-run-row span {
  color: var(--iris-title-block-value-soft);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-note,
body.zone-mode:not(.model-home-active) .model-state-ledger-run-head,
body.zone-mode:not(.model-home-active) .model-state-ledger-run-row {
  border-bottom-color: var(--iris-title-block-line-soft);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-run-head span,
body.zone-mode:not(.model-home-active) .model-state-ledger-run-row span {
  border-right-color: rgba(216, 230, 236, 0.10);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-next {
  background: rgba(216, 230, 236, 0.07);
  border-color: rgba(236, 248, 252, 0.52);
  color: rgba(249, 253, 255, 0.96);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-next-detail {
  border-top-color: var(--iris-title-block-line-soft);
  color: var(--iris-title-block-detail);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-approval .model-workflow-next-action-button:hover:not(:disabled) {
  background: rgba(216, 230, 236, 0.11);
  border-color: rgba(249, 253, 255, 0.68);
  color: rgba(255, 255, 255, 1);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-approval .model-workflow-next-action-button:disabled {
  background: rgba(216, 230, 236, 0.035);
  border-color: rgba(216, 230, 236, 0.20);
  color: rgba(216, 230, 236, 0.42);
}
