/* IRIS UI — contained model surface */

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

[data-rail-notes] { margin: 10px 0; font-size: 12px; }
[data-rail-notes] button { padding: 6px 9px; color: var(--fg); background: var(--bg); border: 1px solid var(--border); cursor: pointer; }
[data-rail-notes] button:disabled { opacity: .5; cursor: default; }
[data-note-scope] { color: var(--fg-dim); margin: 5px 0; }
.rail-note-list { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.rail-note-list > details { border-bottom: 1px solid var(--border); padding: 8px 0; }
.rail-note-list pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; margin: 6px 0; }
.rail-note-list summary { cursor: pointer; overflow-wrap: anywhere; }
.rail-note-list [data-note-scope] { display: block; }
.rail-method-review pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.rail-method-review h4 { margin-top: 12px; margin-bottom: 5px; }
.rail-method-review [data-diff-row] { padding: 6px 0; border-bottom: 1px solid var(--border); }
.method-diff-pair { display: grid; gap: 8px; margin: 4px 0; }
.method-diff-pair span { font-weight: 600; }
.method-diff-pair pre { margin: 2px 0; }
[data-rail-notes] [role="alert"] { color: var(--error); }

: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 #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-zone-mode,
body.model-home-active #btn-focus-mode {
  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: safe 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;
}

.search-recent-rail {
  min-width: 0;
  height: 518px;
  display: flex;
  flex-direction: column;
  padding: 8px 0 0 22px;
  border-left: 1px solid rgba(49, 79, 115, 0.22);
  box-sizing: border-box;
  color: rgba(49, 79, 115, 0.88);
}

.search-recent-section {
  min-height: 0;
}

.search-recent-rail h2 {
  margin: 0;
  padding: 0 0 13px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
  font: 650 11px/1.3 var(--mono);
  letter-spacing: 0.18em;
}

.search-recent-list {
  max-height: 352px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(49, 79, 115, 0.30) transparent;
}

.search-workflows-signpost {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(49, 79, 115, 0.22);
}

.search-workflows-alpha {
  margin-left: 3px;
  color: rgba(49, 79, 115, 0.56);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.search-workflows-copy {
  max-width: 230px;
  margin: 13px 8px 0 0;
  color: rgba(31, 42, 46, 0.76);
  font: 600 11px/1.55 var(--font);
}

.search-recent-row {
  width: 100%;
  display: grid;
  gap: 5px;
  padding: 13px 8px 13px 0;
  border: 0;
  border-bottom: 1px solid rgba(49, 79, 115, 0.12);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.search-recent-row:hover {
  background: rgba(49, 79, 115, 0.035);
}

.search-recent-row:focus-visible {
  outline: 2px solid rgba(49, 79, 115, 0.72);
  outline-offset: -2px;
}

.search-recent-label {
  min-width: 0;
  overflow: hidden;
  color: rgba(31, 42, 46, 0.88);
  font: 620 11px/1.4 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-recent-meta {
  color: rgba(49, 79, 115, 0.62);
  font: 520 9px/1.4 var(--mono);
  letter-spacing: 0.035em;
}

.search-recent-empty {
  margin: 0;
  padding: 16px 8px 0 0;
  color: rgba(49, 79, 115, 0.58);
  font: 520 10px/1.5 var(--mono);
}

.search-runbook-download {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding: 18px 8px 0 0;
  border-top: 1px solid rgba(49, 79, 115, 0.22);
  color: rgba(49, 79, 115, 0.72);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.search-runbook-download:hover {
  color: rgba(49, 79, 115, 1);
}

.search-runbook-download:focus-visible {
  outline: 2px solid rgba(49, 79, 115, 0.72);
  outline-offset: 4px;
}

.search-runbook-download-title {
  max-width: 230px;
  font: 600 11px/1.5 var(--font);
}

.search-portfolio-view-link {
  display: block;
  margin: 10px 8px 0 0;
  color: rgba(49, 79, 115, 0.72);
  font: 600 10px/1.4 var(--font);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.search-portfolio-view-link:hover {
  color: rgba(49, 79, 115, 1);
}

.search-portfolio-view-link:focus-visible {
  outline: 2px solid rgba(49, 79, 115, 0.72);
  outline-offset: 4px;
}

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

.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: 568px;
  }
}

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

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

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-spacer {
  min-height: 53.2px;
}

.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: 100%;
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }



  .search-recent-rail {
    width: 100%;
    height: auto;
    max-height: none;
    padding: 18px 0 0;
    border-top: 1px solid rgba(49, 79, 115, 0.22);
    border-left: 0;
  }

  .search-recent-list {
    max-height: 218px;
  }

  .search-workflows-signpost {
    margin-top: 18px;
    padding-top: 16px;
  }

  .search-workflows-copy {
    max-width: none;
  }

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

  .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: 0;
  }








  .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;
}

/* Governed reasoning model — quiet system context, subordinate to the
   primary search and create affordances. Display only: not interactive. */
.model-home-reasoning-model {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  pointer-events: none;
}

.model-home-reasoning-model-label {
  color: rgba(49, 79, 115, 0.58);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.model-home-reasoning-model-value {
  color: rgba(49, 79, 115, 0.78);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.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);
}

.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 Catalog on Model Home (MODEL-FACTORY-001 Cut 5). */
.model-catalog-panel { margin-top: 14px; padding: 12px 14px; border: 1px solid rgba(49, 79, 115, 0.22); border-radius: 4px; }
.model-catalog-panel[hidden] { display: none; }
.model-catalog-head { display: flex; align-items: baseline; justify-content: space-between; }
.model-catalog-head h2 { margin: 0; font: 600 13px var(--font); }
.model-catalog-close { border: 0; background: transparent; font-size: 16px; cursor: pointer; color: rgba(49, 79, 115, 0.7); }
.model-catalog-dim { color: rgba(49, 79, 115, 0.7); font-size: 12px; }
.model-catalog-error:empty { display: none; }
.model-catalog-error { color: #9b2c2c; font-size: 12px; }
.model-catalog-list { list-style: none; margin: 8px 0 0; padding: 0; }
.model-catalog-entry { padding: 10px 0; border-top: 1px solid rgba(49, 79, 115, 0.14); }
.model-catalog-entry-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.model-catalog-title { display: block; font: 600 13px var(--font); }
.model-catalog-actions { display: flex; gap: 10px; flex: 0 0 auto; }
.model-catalog-action, .model-catalog-preview-toggle { font: 560 12px var(--font); cursor: pointer; padding: 4px 10px; border-radius: 3px; }
.model-catalog-action { border: 1px solid rgba(49, 79, 115, 0.5); background: rgba(49, 79, 115, 0.9); color: #fff; }
.model-catalog-action[disabled] { opacity: 0.7; cursor: progress; }
.model-catalog-preview-toggle { border: 1px solid rgba(49, 79, 115, 0.3); background: transparent; color: rgba(49, 79, 115, 0.9); }
.model-catalog-progress { margin: 6px 0 0; font-size: 12px; }
.model-catalog-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 8px 0 0; font-size: 12px; }
.model-catalog-facts dt { color: rgba(49, 79, 115, 0.7); }
.model-catalog-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.model-catalog-entry-head > div:first-child { min-width: 0; }

.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;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  /* The full filtered inventory renders; the page scrolls, not this box. */
  max-height: none;
  overflow: visible;
  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-width: 0;
  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-overflow:focus {
  outline: none;
}

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

.model-home-result-name {
  display: inline-block;
  max-width: calc(100% - 96px);
  vertical-align: middle;
  color: var(--fg);
  font: 600 12px/1.2 var(--mono);
  letter-spacing: 0.06em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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: fixed;
  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-corpus-count {
  max-width: none;
  margin-top: 8px;
  color: #314F73;
  font: 600 12px/1.5 var(--mono);
  letter-spacing: 0.08em;
}

.model-home-scope {
  margin: 4px 0 0;
  color: rgba(49, 79, 115, 0.72);
  font: 500 10px/1.5 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.model-home-lifecycle-count {
  display: inline-block;
  min-width: 1.2em;
  margin-left: 4px;
  color: rgba(49, 79, 115, 0.55);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.model-home-lifecycle-option.active .model-home-lifecycle-count {
  color: #314F73;
}

.model-home-result-status {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 6px;
  border: 1px solid rgba(49, 79, 115, 0.28);
  border-radius: 2px;
  color: rgba(49, 79, 115, 0.78);
  font: 600 9px/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: middle;
}

.model-home-result-status.is-archived {
  border-style: dashed;
  color: rgba(49, 79, 115, 0.55);
}

.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;
}

.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;
}


.timeline-lineage-surface {
  min-width: 0;
  margin: 0 0 18px;
  padding: 12px 0 14px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
}

.timeline-lineage-heading {
  color: rgba(49, 65, 72, 0.72);
  font: 760 11px/1.2 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline-lineage-status {
  min-height: 24px;
  padding: 8px 0;
  color: rgba(49, 65, 72, 0.58);
  font: 520 10px/1.3 var(--mono);
}

.timeline-lineage-viewport {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 4px 0 14px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.22);
  outline: none;
  scrollbar-color: rgba(49, 79, 115, 0.62) rgba(49, 79, 115, 0.10);
  scrollbar-gutter: stable;
  scrollbar-width: auto;
}

.timeline-lineage-viewport::-webkit-scrollbar {
  height: 12px;
}

.timeline-lineage-viewport::-webkit-scrollbar-track {
  border-top: 1px solid rgba(49, 79, 115, 0.18);
  background: rgba(49, 79, 115, 0.10);
}

.timeline-lineage-viewport::-webkit-scrollbar-thumb {
  border: 2px solid rgba(244, 247, 247, 0.88);
  border-radius: 0;
  background: rgba(49, 79, 115, 0.62);
}

.timeline-lineage-viewport::-webkit-scrollbar-thumb:hover {
  background: rgba(49, 79, 115, 0.78);
}

.timeline-lineage-viewport:focus-visible {
  box-shadow: 0 0 0 2px rgba(49, 79, 115, 0.42);
}

.timeline-lineage-graph {
  position: relative;
  min-height: 88px;
  background: transparent;
}

.timeline-lineage-lane-rule {
  position: absolute;
  z-index: 0;
  height: 0;
  border-top: 1px solid rgba(49, 79, 115, 0.10);
  pointer-events: none;
}

.timeline-lineage-edges {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.timeline-lineage-edge {
  fill: none;
  stroke-width: 1.5;
  stroke: rgba(49, 79, 115, 0.46);
}

.timeline-lineage-edge.merge-parent {
  stroke: rgba(122, 82, 52, 0.66);
  stroke-dasharray: 4 3;
}

.timeline-lineage-lane-label {
  position: absolute;
  left: 0;
  z-index: 2;
  width: 84px;
  padding: 5px 4px;
  color: rgba(49, 65, 72, 0.64);
  font: 700 9px/1 var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-lineage-lane-label.main::before,
.timeline-lineage-lane-label.current::before {
  content: "◆ ";
  color: rgba(49, 79, 115, 0.78);
}

.timeline-lineage-node {
  position: absolute;
  z-index: 3;
  width: 94px;
  min-height: 42px;
  padding: 5px 7px;
  border: 1px solid rgba(49, 79, 115, 0.28);
  border-radius: 2px;
  background: rgba(250, 250, 248, 0.96);
  color: rgba(31, 42, 46, 0.82);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.72);
  font: 600 9px/1.2 var(--mono);
}

.timeline-lineage-node strong,
.timeline-lineage-node span,
.timeline-lineage-node small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-lineage-node span { color: rgba(49, 79, 115, 0.68); }
.timeline-lineage-node small { margin-top: 3px; color: rgba(49, 65, 72, 0.54); font-size: 8px; }
.timeline-lineage-node.current-head { border-color: rgba(49, 79, 115, 0.78); box-shadow: 0 0 0 2px rgba(49, 79, 115, 0.12); }
.timeline-lineage-node.branch-head { border-top: 3px solid rgba(49, 79, 115, 0.56); }
.timeline-lineage-node.timeline-version-cross-highlight:not(.selected) {
  border-color: var(--accent-dark);
  outline: 1px dashed var(--accent);
  outline-offset: 2px;
}
.timeline-lineage-node.selected { outline: 2px solid rgba(122, 82, 52, 0.70); outline-offset: 2px; }
.timeline-lineage-node:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 2px; }

.timeline-lineage-context {
  margin-top: 12px;
  padding: 10px 12px;
  border-top: 1px solid rgba(49, 79, 115, 0.18);
  background: rgba(255, 255, 255, 0.34);
}

.timeline-lineage-context-title {
  color: rgba(49, 65, 72, 0.76);
  font: 760 10px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline-lineage-context-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 8px;
  color: rgba(49, 65, 72, 0.68);
  font: 520 10px/1.3 var(--mono);
}

.timeline-lineage-context-facts strong { color: rgba(49, 65, 72, 0.88); }

.timeline-lineage-context-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.timeline-lineage-context-actions button {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(49, 79, 115, 0.24);
  border-radius: 2px;
  background: rgba(250, 250, 248, 0.78);
  color: rgba(49, 65, 72, 0.82);
  font: 650 9px/1 var(--mono);
  cursor: pointer;
}

.timeline-lineage-context-actions button:hover,
.timeline-lineage-context-actions button:focus-visible {
  border-color: rgba(49, 79, 115, 0.62);
  outline: 2px solid rgba(49, 79, 115, 0.18);
  outline-offset: 1px;
}

.research-shell-technical-details {
  margin-top: 8px;
  color: rgba(49, 65, 72, 0.56);
  font-size: 10px;
}

.research-shell-technical-details summary {
  cursor: pointer;
  color: rgba(49, 65, 72, 0.62);
  font: 620 9px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@media (prefers-reduced-motion: reduce) {
  .timeline-lineage-viewport *, .timeline-lineage-viewport { scroll-behavior: auto !important; transition: none !important; }
}

/* ─── 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;
}

.repository-entry-loading,
.hosted-workspace-loading {
  color-scheme: light;
  --fg: #1F2E3D;
  --fg-dim: #6A7882;
  --fg-muted: #314F73;
  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;
}

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

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

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

.repository-entry-loading-subtitle,
.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;
}

body.repository-entry-opening-active #main {
  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-row {
  align-items: center;
  display: grid;
  gap: 6px;
  min-width: 0;
  width: max-content;
}

.model-through-time-density-head {
  color: var(--fg-dim);
  font: 700 11px/1.2 var(--mono);
}

.model-through-time-density-head > span {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.model-through-time-density-head .model-through-time-density-date-label {
  overflow: visible;
}

.model-through-time-density-head .model-through-time-today {
  color: var(--fg);
  font-weight: 860;
  transform: translateY(-1px);
}

.model-through-time-density-label {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  font: 760 11px/1.2 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-visible {
  color: var(--accent-dark);
  outline: none;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.model-through-time-density-cell {
  align-items: center;
  background: var(--timeline-density-empty);
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  font: 0/0 var(--font);
  aspect-ratio: 1 / 1;
  height: 18px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 18px;
}

.model-through-time-density-cell.density-one {
  background: var(--timeline-density-one);
  border-color: color-mix(in srgb, var(--accent) 42%, transparent);
}

.model-through-time-density-cell.density-some {
  background: var(--timeline-density-some);
  border-color: var(--accent);
}

.model-through-time-density-cell.density-many {
  background: var(--timeline-density-many);
  border-color: var(--accent-dark);
}

.model-through-time-density-cell.today {
  border-color: color-mix(in srgb, var(--accent-dark) 72%, transparent);
}

.model-through-time-density-cell:hover {
  border-color: var(--accent-dark);
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.model-through-time-density-cell.timeline-version-cross-highlight:not(.selected) {
  border-color: var(--accent-dark);
  outline: 1px dashed var(--accent-dark);
  outline-offset: 1px;
}

.model-through-time-density-cell.timeline-selected-version-link::after {
  position: absolute;
  right: 3px;
  bottom: 2px;
  left: 3px;
  height: 2px;
  background: var(--accent-dark);
  content: "";
  pointer-events: none;
}

.model-through-time-density-cell.selected {
  border-color: var(--accent-dark);
  box-shadow:
    0 0 0 2px var(--surface),
    0 0 0 4px color-mix(in srgb, var(--accent) 48%, transparent);
  z-index: 1;
}

.model-through-time-density-cell:focus-visible {
  border-color: var(--accent-dark);
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
  z-index: 2;
}

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

.model-through-time-day-bundle {
  border-top: 1px solid var(--border);
  color: var(--fg-muted);
  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: var(--fg);
  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: var(--fg-dim);
  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: var(--fg);
  font-weight: 680;
}

.model-through-time-bundle-sections li small {
  color: var(--fg-dim);
  font-size: 8.5px;
}

.model-through-time-empty,
.model-through-time-artifact-empty {
  color: var(--fg-dim);
  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;
}

[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);
}

.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-name {
  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 {
  border-color: rgba(15, 143, 152, 0.34);
  box-shadow: 0 0 0 3px rgba(15, 143, 152, 0.10);
}

/* ─── 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-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);
}

.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-results {
  min-height: 0;
}
#tab-results: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;
}
.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;
}
.research-shell-context-card > summary {
  cursor: pointer;
  list-style-position: inside;
}
.research-shell-context-card:not([open]) {
  background: transparent;
}
.research-shell-context-card:not([open]) > :not(summary) {
  display: none !important;
}
.research-shell-context-card .research-shell-import-exceptions,
.research-shell-context-card .run-readiness-items {
  max-height: none;
  overflow-y: visible;
}

.research-shell-import-exceptions {
  border: 1px solid rgba(184, 118, 35, 0.2);
  border-radius: 6px;
  background: rgba(255, 247, 232, 0.72);
  flex: 0 0 auto;
  margin-bottom: 5px;
  max-height: 220px;
  overflow-y: auto;
  padding: 6px;
}
.research-shell-import-exception-head {
  color: #704615;
  font-size: 8px;
  font-weight: 760;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.research-shell-import-exception {
  border-top: 1px solid rgba(184, 118, 35, 0.14);
  padding: 4px 0;
}
.research-shell-import-exception:first-of-type { border-top: 0; }
.research-shell-import-exception strong {
  color: #3c2d1a;
  display: block;
  font-size: 8.5px;
}
.research-shell-import-exception span,
.research-shell-import-exception em {
  color: rgba(75, 65, 49, 0.8);
  display: block;
  font-size: 7.5px;
  font-style: normal;
  line-height: 1.35;
}
.research-shell-import-exception[data-severity="error"] strong { color: var(--error); }
.research-shell-import-exception[data-severity="warning"] strong { color: #8a5719; }

.research-shell-context-kicker {
  color: rgba(75, 93, 100, 0.78);
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 3px;
}
.research-shell-context-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 2px 6px;
  align-items: baseline;
}
.research-shell-context-grid span {
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
}
.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;
}

.iris-learning-summary {
  border-top: 1px solid rgba(31,42,46,0.09);
  display: grid;
  gap: 4px;
  padding: 8px 0;
}
.iris-learning-summary > p {
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
  line-height: 1.35;
  margin: 0;
}
.iris-learning-measures {
  display: grid;
  gap: 2px 6px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.iris-learning-measures span,
.iris-learning-measures strong {
  font-size: 8px;
  line-height: 1.35;
}
.iris-learning-measures span { color: rgba(75, 93, 100, 0.78); }
.iris-learning-measures strong {
  color: #17262B;
  font-weight: 620;
}
.iris-learning-summary[data-projection-status="failed_closed"] .iris-learning-measures strong {
  color: rgba(75, 93, 100, 0.62);
}

.iris-method-context-empty {
  color: rgba(75, 93, 100, 0.72);
  display: grid;
  gap: 3px;
}
.iris-method-context-empty[hidden] { display: none; }
.iris-method-context-empty p { font-size: 8px; margin: 0; }
.iris-method-context-card {
  display: grid;
  gap: 7px;
}
.iris-method-context-head,
.iris-method-context-meta,
.iris-method-current-status {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-width: 0;
}
.iris-method-context-head { gap: 8px; }
.iris-method-context-head h3 {
  color: #17262B;
  font-size: 12px;
  line-height: 1.2;
  margin: 0;
}
.iris-selected-forecast-responsibility > p {
  color: rgba(75, 93, 100, 0.78);
  font-size: 8px;
  line-height: 1.35;
  margin: 0;
}
.iris-selected-forecast-responsibility {
  border-left: 2px solid var(--error);
  padding-left: 7px;
}
.iris-selected-forecast-responsibility .research-shell-context-kicker,
.iris-selected-forecast-responsibility .iris-method-context-head h3 {
  color: var(--error);
}
.iris-selected-forecast-responsibility [data-selected-forecast-responsibility-review] {
  border-color: var(--error);
  color: var(--error);
}
.iris-selected-forecast-context-line {
  color: rgba(45, 58, 63, 0.82) !important;
  font-size: 8px !important;
  font-variant-numeric: tabular-nums;
}
.iris-selected-forecast-method-primary {
  border-top: 1px solid rgba(31,42,46,0.09);
  display: grid;
  gap: 3px;
  padding-top: 7px;
}
.iris-selected-forecast-method-primary > strong {
  color: #17262B;
  font-size: 10px;
}
.iris-selected-forecast-method-primary > p,
.iris-selected-forecast-method-summary {
  color: rgba(45,58,63,0.84);
  font-size: 8px;
  line-height: 1.4;
  margin: 0;
}
.iris-selected-forecast-method-summary {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  display: -webkit-box;
  overflow: hidden;
}
.iris-selected-forecast-method-standing {
  align-items: baseline;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}
.iris-selected-forecast-method-standing strong {
  color: #16666e;
  font-size: 9px;
}
.iris-selected-forecast-method-standing span {
  color: rgba(75, 93, 100, 0.7);
  font-size: 7.5px;
}
.iris-selected-forecast-method-secondary > summary {
  color: rgba(75, 93, 100, 0.76);
  cursor: pointer;
  font-size: 7.5px;
}
.iris-selected-forecast-method-secondary-body {
  display: grid;
  gap: 7px;
  padding-top: 7px;
}
.iris-selected-forecast-responsibility-has-method {
  border-left-color: rgba(22,102,110,0.46);
}
.iris-selected-forecast-responsibility-has-method .research-shell-context-kicker,
.iris-selected-forecast-responsibility-has-method .iris-method-context-head h3 {
  color: #17262B;
}
.iris-selected-forecast-absence {
  color: rgba(75, 93, 100, 0.72);
  display: grid;
  gap: 3px;
}
.iris-selected-forecast-absence p {
  font-size: 8px;
  line-height: 1.4;
  margin: 0;
}
.iris-method-context-head button,
.iris-outcome-resolution button {
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(22,102,110,0.28);
  border-radius: 999px;
  color: #16666e;
  cursor: pointer;
  flex: 0 0 auto;
  font: 700 8px/1.2 var(--font);
  padding: 5px 7px;
}
.iris-method-context-meta {
  color: rgba(75, 93, 100, 0.78);
  font-size: 8px;
}
.iris-method-context-meta strong { color: #16666e; }
.iris-method-current-claim {
  background: rgba(230,245,239,0.58);
  border-left: 2px solid #2f8a67;
  border-radius: 0 5px 5px 0;
  padding: 6px 7px;
}
.iris-method-current-claim span,
.iris-method-current-status span {
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
}
.iris-method-current-claim p {
  color: #17262B;
  font-size: 9px;
  line-height: 1.35;
  margin: 2px 0 0;
}
.iris-method-current-status strong {
  color: #17262B;
  font-size: 8px;
}
.iris-method-counts {
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
}
.iris-method-counts > div {
  background: rgba(248,249,250,0.78);
  border-radius: 4px;
  display: grid;
  gap: 1px;
  padding: 4px;
  text-align: center;
}
.iris-method-counts dt {
  color: rgba(75, 93, 100, 0.7);
  font-size: 6.5px;
}
.iris-method-counts dd {
  color: #17262B;
  font-size: 9px;
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}
.iris-research-commands {
  border-block: 1px solid rgba(31,42,46,0.09);
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px 0;
}
.iris-research-commands-head,
.iris-research-command-bar,
.iris-research-review-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.iris-research-commands-head {
  justify-content: space-between;
}
.iris-research-commands-head > span {
  color: rgba(75, 93, 100, 0.78);
  font-size: 8px;
  font-weight: 700;
}
.iris-research-commands-head > em {
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
  font-style: normal;
}
.iris-research-secondary-actions-head {
  border-top: 1px solid rgba(31,42,46,0.08);
  margin-top: 7px;
  padding-top: 7px;
}
.iris-research-secondary-actions {
  padding: 5px 0 2px;
}
.iris-research-command-bar button,
.iris-research-command-output button {
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(31,42,46,0.14);
  border-radius: 999px;
  color: #16666e;
  cursor: pointer;
  font: 700 8px/1.2 var(--font);
  padding: 5px 7px;
}
.iris-research-command-output {
  background: rgba(248,249,250,0.72);
  border-radius: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding: 7px;
}
.iris-research-command-output:has(.current-understanding-investor-disclosure) {
  max-height: none;
  overflow: visible;
}
.iris-research-command-result {
  display: grid;
  gap: 6px;
}
.iris-research-command-result > p,
.iris-research-command-result article span,
.iris-research-command-result article em {
  display: block;
  font-size: 8px;
  line-height: 1.35;
  margin: 0;
}
.iris-research-command-result article {
  border-top: 1px solid rgba(31,42,46,0.08);
  display: grid;
  gap: 4px;
  padding: 6px 0;
}
.iris-research-command-result form {
  display: grid;
  gap: 5px;
}
.iris-research-command-result input {
  border: 1px solid rgba(31,42,46,0.14);
  border-radius: 4px;
  font: 500 9px/1.3 var(--font);
  min-width: 0;
  padding: 5px 6px;
}
.iris-research-command-result textarea,
.iris-research-command-result input {
  border: 1px solid rgba(31,42,46,0.14);
  border-radius: 4px;
  font: 9px/1.4 var(--font);
  padding: 5px;
  resize: vertical;
}

.current-understanding-card {
  display: grid;
  gap: 8px;
}
.current-understanding-investor-disclosure {
  border-top: 1px solid rgba(31,42,46,0.08);
  padding-top: 7px;
}
.current-understanding-investor-disclosure > summary {
  align-items: baseline;
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  list-style-position: inside;
}
.current-understanding-investor-disclosure > summary span:first-child {
  font-weight: 650;
}
.current-understanding-investor-disclosure > summary span:last-child {
  color: rgba(75, 93, 100, 0.72);
  font-size: 8px;
  white-space: nowrap;
}
.current-understanding-investor-disclosure[open] > summary {
  margin-bottom: 8px;
}
.current-understanding-boundary,
.current-understanding-readiness,
.current-understanding-actions {
  align-items: center;
  display: flex;
  gap: 6px;
  justify-content: space-between;
}
.current-understanding-editor-boundary,
.current-understanding-orientation,
.current-understanding-interpretation,
.current-understanding-section p,
.current-understanding-section ul {
  margin: 0;
}
.current-understanding-editor-boundary {
  border-left: 2px solid rgba(160, 104, 24, 0.5);
  color: rgba(91, 61, 18, 0.9);
  padding-left: 6px;
}
.current-understanding-orientation {
  color: rgba(75, 93, 100, 0.72);
  font-size: 8px;
}
.current-understanding-section {
  display: grid;
  gap: 4px;
}
.current-understanding-section ul {
  padding-left: 15px;
}
.current-understanding-claim {
  display: grid;
  gap: 2px;
}
.current-understanding-forecast-methods {
  gap: 8px;
}
.current-understanding-forecast-methods > strong {
  font-size: 12px;
  line-height: 1.4;
}
.current-understanding-forecast-methods .current-understanding-claim {
  border-top: 1px solid rgba(31,42,46,0.08);
  gap: 5px;
  padding: 9px 0 2px;
}
.current-understanding-candidate-model-details {
  display: grid;
  gap: 2px;
}
.current-understanding-candidate-model-details > strong {
  font-size: 8px;
}
.forecast-responsibility-current {
  color: var(--ink, #1d252b);
  font-size: 12px;
  font-weight: 620;
}
.current-understanding-workbook-observations,
.current-understanding-model-details {
  border-top: 1px solid rgba(31,42,46,0.08);
  padding-top: 7px;
}
.current-understanding-workbook-observations > summary,
.current-understanding-model-details > summary {
  cursor: pointer;
  font-weight: 650;
}

.current-understanding-explicit-view {
  display: grid;
  gap: 7px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(127, 127, 127, .18);
}

.current-understanding-explicit-view label {
  font-size: 11px;
  font-weight: 600;
}

.current-understanding-explicit-view textarea {
  min-height: 58px;
  resize: vertical;
}

.current-understanding-explicit-view [data-explicit-view-result] {
  display: grid;
  gap: 7px;
  color: var(--ink-muted, #6f747b);
  font-size: 11px;
}

.current-understanding-explicit-view [data-explicit-view-result] p {
  margin: 0;
}
.current-understanding-actions [role="status"] {
  color: rgba(75, 93, 100, 0.78);
  font-size: 8px;
}

.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;
}
.research-shell-entry {
  border-top: 1px solid rgba(31,42,46,0.08);
  padding: 8px 0 0;
}
.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;
}
.research-shell-entry-body {
  color: #17262B;
  font-size: 11.5px;
  line-height: 1.42;
  margin: 4px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.research-shell-evidence-refs {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 2px 0 3px;
}
.research-shell-message-selection {
  margin-top: 5px;
}
.research-shell-selection-request {
  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;
}
.research-shell-source-selection-slot[hidden] {
  display: none !important;
}
.research-shell-projection-empty {
  font-size: 8.5px;
  line-height: 1.25;
}
.research-shell-projection-empty {
  color: rgba(75, 93, 100, 0.72);
}
.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;
}


.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-compare-subjects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.run-compare-subjects .run-compare-summary {
  padding: 8px;
  border: 1px solid rgba(31,42,46,0.08);
  border-radius: 6px;
  -webkit-line-clamp: initial;
}

.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);
}

.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;
  }


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

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

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

}

.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;
}

#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;
}

@media (max-width: 820px) {


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

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

#new-model-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 {
  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;
}

.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 {
  color-scheme: light;
  --bg-input: #FFFFFF;
  --surface: #FFFFFF;
  --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;
  --select: #54789C;
  color: var(--fg);
}

#llm-formula-modal {
  display: flex;
  flex-direction: column;
  width: 86vw;
  height: 86vh;
  max-height: calc(100vh - 36px);
  overflow: hidden;
  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 {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

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

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

.llm-no-method {
  margin: 28px auto;
  width: min(620px, 100%);
  color: var(--fg-dim);
}

.llm-no-method p {
  margin: 0 0 12px;
  color: var(--fg);
  font-size: 13px;
}

.llm-method-birth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

#llm-existing-method-picker {
  margin-top: 14px;
}

.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-formula-modal .llm-method-editor {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

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

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

.llm-method-document-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.llm-method-mode-actions {
  display: flex;
  gap: 6px;
}

.llm-method-identity {
  color: var(--fg);
  font-size: 15px;
  font-weight: 680;
}

.llm-method-display-state {
  margin-top: 2px;
  color: var(--fg-muted);
  font-size: 11px;
  font-weight: 600;
}

.llm-method-orientation {
  min-height: 16px;
  margin-top: 3px;
  color: var(--fg-dim);
  font-size: 10px;
  line-height: 1.4;
}

.llm-method-read-surface {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  margin-top: 7px;
}

.llm-method-document-tools {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: auto minmax(160px, 1fr) auto auto auto auto;
  align-items: center;
  gap: 6px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
}

.llm-method-document-tools label,
#llm-method-search-status {
  color: var(--fg-dim);
  font-size: 10px;
}

#llm-method-search {
  min-width: 0;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-input);
  color: var(--fg);
  padding: 5px 8px;
  font: inherit;
  font-size: 11px;
}

.llm-method-comparison {
  flex: 0 0 auto;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--fg-dim);
  font-size: 10px;
}

.llm-method-comparison summary {
  color: var(--fg-muted);
  cursor: pointer;
  font-weight: 620;
}

#llm-method-comparison-summary {
  margin-top: 7px;
  line-height: 1.45;
}

.llm-method-comparison-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.llm-method-reader-layout {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
  min-height: 0;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

#llm-method-toc {
  overflow: auto;
  border-right: 1px solid var(--border);
  background: rgba(243, 247, 249, 0.86);
  padding: 12px 9px;
  color: var(--fg-dim);
  font-size: 10px;
}

#llm-method-toc > strong {
  display: block;
  margin: 0 6px 7px;
  color: var(--fg-muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#llm-method-toc p {
  margin: 0 6px;
  line-height: 1.45;
}

#llm-method-toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#llm-method-toc li {
  min-width: 0;
  padding-left: calc(var(--method-heading-depth, 0) * 10px);
}

#llm-method-toc button {
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  padding: 5px 6px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

#llm-method-toc button:hover,
#llm-method-toc button.active {
  background: rgba(84, 120, 156, 0.12);
  color: var(--fg-muted);
}

.llm-method-read-viewport {
  min-width: 0;
  overflow: auto;
  scroll-behavior: smooth;
  outline: none;
}

.llm-method-read-viewport:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(84, 120, 156, 0.28);
}

.llm-method-rendered {
  width: min(82ch, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 80px;
  color: var(--fg);
  font-size: 12px;
  line-height: 1.7;
}

.llm-method-rendered h1,
.llm-method-rendered h2,
.llm-method-rendered h3,
.llm-method-rendered h4,
.llm-method-rendered h5,
.llm-method-rendered h6 {
  scroll-margin-top: 14px;
  color: var(--fg);
  line-height: 1.25;
}

.llm-method-rendered h1 { margin: 0 0 18px; font-size: 24px; }
.llm-method-rendered h2 { margin: 30px 0 10px; font-size: 18px; }
.llm-method-rendered h3 { margin: 24px 0 8px; font-size: 15px; }
.llm-method-rendered h4,
.llm-method-rendered h5,
.llm-method-rendered h6 { margin: 18px 0 7px; font-size: 13px; }
.llm-method-rendered p { margin: 0 0 12px; }
.llm-method-rendered ul,
.llm-method-rendered ol { margin: 0 0 14px; padding-left: 24px; }
.llm-method-rendered blockquote {
  margin: 14px 0;
  border-left: 3px solid var(--accent-light);
  padding: 4px 0 4px 14px;
  color: var(--fg-dim);
}
.llm-method-rendered pre {
  overflow: auto;
  margin: 14px 0;
  border-radius: 8px;
  background: #f3f5f6;
  padding: 12px;
  line-height: 1.5;
}
.llm-method-rendered code { font-family: var(--mono); font-size: 0.94em; }
.llm-method-rendered table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
}
.llm-method-rendered th,
.llm-method-rendered td {
  border: 1px solid var(--border);
  padding: 7px 8px;
  text-align: left;
  vertical-align: top;
}
.llm-method-rendered th { background: rgba(243, 247, 249, 0.86); }

.llm-method-search-match {
  border-radius: 2px;
  background: #fff0a8;
  color: inherit;
  padding: 0 1px;
}

.llm-method-search-match.active {
  background: #ffd25f;
  box-shadow: 0 0 0 2px rgba(161, 116, 19, 0.24);
}

.llm-method-document-field label {
  font-weight: 620;
}

#llm-method-generated-editor {
  display: grid;
  gap: 16px;
}

.llm-generated-method-component {
  display: grid;
  gap: 7px;
}

.llm-generated-method-component > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.llm-generated-method-component textarea {
  min-height: 92px;
  resize: vertical;
}

/* Keep the rail's small Method label visually subordinate to the conclusion. */
.rail-method-label {
  color: rgba(24, 35, 39, 0.46);
  font-size: 9px;
  letter-spacing: 0.04em;
  margin: 12px 0 6px;
  text-transform: uppercase;
}

.generated-m0-thinks p,
.generated-m0-instructions > p,
.generated-m0-approach-block p {
  color: rgba(24, 35, 39, 0.82);
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 10px;
  white-space: pre-line;
}

.generated-m0-thinks {
  border-left: 3px solid rgba(37, 91, 84, 0.62);
  margin: 0 0 16px;
  padding: 2px 0 2px 11px;
}

.generated-m0-thinks h3,
.generated-m0-instructions > h3 {
  color: rgba(24, 35, 39, 0.55);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.generated-m0-thinks p {
  color: rgba(24, 35, 39, 0.92);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
}

.generated-m0-state {
  color: rgba(24, 35, 39, 0.82);
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 16px;
  white-space: pre-line;
}

.generated-m0-state button {
  margin-left: 8px;
}

.generated-m0-instructions {
  margin: 0 0 8px;
}

/* The research sections follow the Method body, so they need room above them
   rather than sitting flush against the preceding paragraph. Their admitted
   evidence carries URLs and provider identifiers, which have no break
   opportunities: without an explicit break rule one long token widens the
   whole rail column and every line in the rail stops wrapping. */
.generated-m0-why-researched,
.generated-m0-external-research {
  margin: 16px 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.generated-m0-why-researched p,
.generated-m0-external-research p {
  color: rgba(24, 35, 39, 0.82);
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 8px;
}

.generated-m0-external-research ul {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.generated-m0-external-research li {
  border-left: 2px solid rgba(49, 79, 115, 0.16);
  min-width: 0;
  padding-left: 9px;
}

.generated-m0-external-research li > strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin: 0 0 4px;
}

.generated-m0-external-research li p:last-child {
  margin-bottom: 0;
}

.generated-m0-source {
  color: rgba(24, 35, 39, 0.55);
  font-size: 10px;
  line-height: 1.45;
}

.generated-m0-source a {
  overflow-wrap: anywhere;
}

.rail-method-model-inputs {
  margin: 14px 0 8px;
}

.rail-method-model-inputs > summary {
  color: rgba(24, 35, 39, 0.62);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  margin: 0;
  text-transform: uppercase;
}

.rail-method-model-inputs[open] > summary {
  margin-bottom: 7px;
}

.rail-method-model-input-table {
  min-width: 0;
}

.rail-method-model-input-list {
  display: grid;
  gap: 5px;
}

.rail-method-model-input-header,
.rail-method-model-input-row {
  align-items: baseline;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.2fr);
}

.rail-method-model-input-header {
  color: rgba(24, 35, 39, 0.42);
  font-size: 9px;
  text-transform: uppercase;
}

.rail-method-model-input-label {
  color: rgba(24, 35, 39, 0.78);
  font-size: 10px;
  min-width: 0;
}

.rail-method-model-input-range {
  color: rgba(24, 35, 39, 0.48);
  font-family: var(--mono);
  font-size: 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.rail-method-model-input-values {
  color: rgba(24, 35, 39, 0.72);
  font-size: 9px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.llm-method-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin-top: 7px;
}

#llm-method-status {
  color: var(--fg-dim);
  font-size: 10px;
}

.llm-method-applicability {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent, #617bff);
  background: color-mix(in srgb, var(--bg-panel) 88%, var(--accent, #617bff) 12%);
  color: var(--fg);
}

.llm-method-applicability h3,
.llm-method-applicability p {
  margin: 0 0 7px;
}

#llm-method-clarification,
#llm-method-observation {
  flex: 0 0 auto;
  max-height: 32vh;
  overflow: auto;
  margin-top: 9px;
  color: var(--fg-dim);
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.llm-supporting-heading {
  color: var(--fg-muted);
  font-weight: 650;
}

.llm-method-clarification-note {
  margin-top: 3px;
  color: var(--fg-dim);
}

#llm-method-suggestions {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.llm-method-suggestion {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-panel) 84%, transparent);
  white-space: normal;
}

.llm-method-suggestion-category {
  margin-bottom: 2px;
  color: var(--fg-muted);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.llm-method-suggestion p {
  margin: 4px 0 7px;
}

.llm-method-suggestion-proposed,
.llm-method-suggestion-editor {
  min-height: 36px;
  padding: 7px 8px;
  border-left: 2px solid var(--border-strong, var(--border));
  background: var(--bg-input);
  color: var(--fg);
  font-family: var(--font);
  font-size: 10px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.llm-method-suggestion-editor {
  width: 100%;
  min-height: 88px;
  resize: vertical;
}

.llm-method-suggestion-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.llm-method-observation-row {
  display: grid;
  grid-template-columns: minmax(116px, 0.28fr) 1fr;
  gap: 10px;
  padding: 4px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 58%, transparent);
  white-space: normal;
}

.llm-method-observation-row strong {
  color: var(--fg-muted);
  font-weight: 600;
}

.llm-method-observation-detail-note {
  margin-top: 5px;
}

.research-method-teaching {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--border-strong, var(--border)) 72%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-panel) 88%, var(--accent, #617bff) 12%);
  color: var(--fg);
}

.research-method-teaching-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.research-method-teaching-head strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
}

#research-method-teaching-stage {
  flex: 0 0 auto;
  max-width: 45%;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--bg-input);
  color: var(--fg-muted);
  font-size: 9px;
  line-height: 1.3;
  text-align: right;
}

#research-method-teaching-body {
  display: grid;
  gap: 7px;
  font-size: 10px;
  line-height: 1.45;
}

#research-method-teaching-body p {
  margin: 0;
}

.research-method-teaching-lead,
.research-method-teaching-proposed,
.research-method-teaching-adopted {
  padding: 8px 9px;
  border-left: 2px solid var(--accent, var(--border-strong, var(--border)));
  background: var(--bg-input);
  color: var(--fg);
  white-space: pre-wrap;
}

.research-method-teaching-current {
  padding: 7px 8px;
  border-left: 2px solid var(--border-strong, var(--border));
  color: var(--fg-dim);
  white-space: pre-wrap;
}

.research-method-teaching-boundary,
.research-method-teaching-refusal {
  color: var(--fg-muted);
}

.research-method-teaching-refusal {
  padding: 7px 8px;
  border: 1px solid var(--danger, var(--border));
  border-radius: 7px;
}

.research-method-teaching-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.research-method-teaching-editor {
  width: 100%;
  min-height: 96px;
  padding: 8px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 7px;
  background: var(--bg-input);
  color: var(--fg);
  font: inherit;
  line-height: 1.45;
  resize: vertical;
}

.research-method-teaching-reasons {
  display: grid;
  gap: 5px;
  margin: 2px 0;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.research-method-teaching-reasons legend {
  padding: 0 4px;
  color: var(--fg);
  font-weight: 650;
}

.research-method-teaching-reasons label {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--fg-dim);
}

.research-method-teaching-reasons input {
  margin-top: 2px;
}

.research-method-teaching-reason-label,
.research-method-teaching-section-title {
  color: var(--fg);
  font-weight: 650;
}

.research-method-teaching-details {
  margin-top: 3px;
  color: var(--fg-dim);
}

.research-method-teaching-details summary {
  cursor: pointer;
  color: var(--fg-muted);
}

.research-method-teaching-details dl {
  display: grid;
  grid-template-columns: minmax(90px, 0.36fr) 1fr;
  gap: 4px 8px;
  margin: 7px 0 0;
}

.research-method-teaching-details dt,
.research-method-teaching-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

#llm-formula-details {
  flex: 0 0 auto;
  max-height: 36vh;
  overflow: auto;
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  color: var(--fg-dim);
  font-size: 10px;
}

#llm-formula-details > summary,
.llm-method-technical-raw > summary {
  color: var(--fg-muted);
  cursor: pointer;
  font-weight: 650;
}

.llm-method-technical-proof {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 8px;
}

.llm-method-technical-proof section {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(243, 247, 249, 0.66);
  padding: 8px;
}

.llm-method-technical-proof h3 {
  margin: 0 0 6px;
  color: var(--fg-muted);
  font-size: 10px;
}

.llm-method-technical-proof dl {
  display: grid;
  grid-template-columns: minmax(112px, auto) minmax(0, 1fr);
  gap: 4px 8px;
  margin: 0;
}

.llm-method-technical-proof dt {
  color: var(--fg-dim);
}

.llm-method-technical-proof dd {
  min-width: 0;
  margin: 0;
  color: var(--fg);
}

.llm-method-technical-proof code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.llm-method-technical-raw {
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
}

.llm-method-technical-raw pre {
  max-height: 220px;
  overflow: auto;
  margin: 7px 0 0;
  border-radius: 6px;
  background: #f3f5f6;
  color: var(--fg);
  padding: 8px;
  font: 9px/1.5 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.llm-method-formula-fields {
  margin-top: 9px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

@media (max-width: 820px) {
  .llm-method-document-tools {
    grid-template-columns: minmax(120px, 1fr) repeat(3, auto);
  }

  .llm-method-document-tools label,
  #llm-method-search-status {
    grid-column: span 1;
  }

  .llm-method-reader-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(84px, 0.3fr) minmax(0, 1fr);
  }

  #llm-method-toc {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

#llm-method-run:not(:disabled) {
  border-color: rgba(84, 120, 156, 0.38);
  color: var(--fg);
  font-weight: 650;
}

#llm-method-run:disabled {
  opacity: 0.48;
}

.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;
}

.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;
}

#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;
  /* The Rail is the second track; a local presentation width feeds it. */
  grid-template-columns: minmax(0, 1fr) var(--rail-width, 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;
}

#grid-container {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;
  cursor: cell;
}

#grid-canvas {
  display: block;
  position: sticky;
  left: 0;
  top: 0;
  z-index: 1;
  outline: none;
}

#grid-scroll-spacer {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

#cell-editor {
  display: none;
  position: absolute;
  z-index: 10;
}

.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;
}

.research-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);
}

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

.research-operation-action {
  width: fit-content;
  margin-top: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(15, 143, 152, 0.24);
  border-radius: 999px;
  background: rgba(216, 243, 245, 0.54);
  color: rgba(14, 85, 91, 0.94);
  font: 650 10px var(--font);
  cursor: pointer;
}

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

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

.research-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 .research-operation-row {
  min-width: 0;
}

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

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

.research-shell-operation-outcome {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.research-shell-operation-outcome > strong {
  color: rgba(14, 85, 91, 0.98);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.research-shell-operation-completion {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding-top: 4px;
  border-top: 1px solid rgba(15, 143, 152, 0.12);
}

.selector-backed-method-result,
.selector-backed-method-refusal,
.research-shell-run-consequence,
.research-shell-run-consequence-unavailable {
  display: grid;
  gap: 8px;
}

.selector-backed-method-result p,
.selector-backed-method-refusal p,
.research-shell-run-consequence p,
.research-shell-run-consequence-unavailable p {
  margin: 0;
}

.selector-backed-method-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selector-backed-method-notice {
  color: rgba(67, 84, 91, 0.76);
  font-size: 11px;
}

.research-shell-run-consequence > strong {
  color: rgba(14, 85, 91, 0.98);
  font-size: 14px;
}

.research-shell-capability-discovery {
  display: grid;
  gap: 10px;
}

.research-shell-capability-intro {
  margin: 0;
  color: rgba(67, 84, 91, 0.76);
  font-size: 11px;
  line-height: 1.4;
}

.research-shell-capability-row {
  display: grid;
  gap: 4px;
  padding-top: 9px;
  border-top: 1px solid rgba(15, 143, 152, 0.14);
}

.research-shell-capability-row > strong {
  color: rgba(24, 35, 39, 0.94);
  font-size: 12px;
}

.research-shell-capability-row > p {
  margin: 0;
  color: rgba(24, 35, 39, 0.80);
  font-size: 11px;
  line-height: 1.4;
}

.research-shell-capability-examples {
  display: grid;
  gap: 2px;
  margin-top: 2px;
}

.research-shell-capability-examples > span {
  color: rgba(67, 84, 91, 0.64);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.research-shell-capability-examples ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding-left: 16px;
  color: rgba(24, 35, 39, 0.76);
  font-size: 10px;
  line-height: 1.35;
}

.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;
  }
}

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

#side-panel {
  background: transparent;
  border: 0;
  border-radius: 16px;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  position: relative;
  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;
}
/* Rail resize: a low-chrome hit target along the Rail's left boundary.
   Drag left widens, drag right narrows; the spreadsheet stays in flow in
   the first grid track. Presentation only. */
.rail-resize-handle {
  bottom: 0;
  cursor: col-resize;
  left: 0;
  position: absolute;
  top: 0;
  touch-action: none;
  width: 12px;
  z-index: 2;
}
.rail-resize-handle::after {
  background: transparent;
  bottom: 12px;
  content: "";
  left: 4px;
  position: absolute;
  top: 12px;
  transition: background var(--motion-fast);
  width: 2px;
}
.rail-resize-handle:hover::after,
.rail-resize-handle:focus-visible::after,
body.rail-resizing .rail-resize-handle::after {
  background: rgba(49, 79, 115, 0.45);
}
.rail-resize-handle:focus-visible { outline: none; }
.rail-resize-handle[hidden] { display: none; }
body.rail-resizing, body.rail-resizing * { cursor: col-resize !important; user-select: none !important; }
body.zone-mode:not(.model-home-active) .rail-resize-handle:hover::after,
body.zone-mode:not(.model-home-active) .rail-resize-handle:focus-visible::after,
body.zone-mode.rail-resizing .rail-resize-handle::after { background: rgba(216, 230, 236, 0.45); }
.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;
}
.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-content {
  min-height: 0;
}
.research-shell-head {
  display: block;
  margin-bottom: 18px;
}
.rail-focus-breadcrumb {
  align-items: center;
  color: rgba(24, 35, 39, 0.62);
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  gap: 5px;
  margin: 0 0 14px;
}
.rail-focus-breadcrumb:empty { display: none; }
.rail-focus-breadcrumb button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}
.rail-focus-breadcrumb button:hover { color: rgba(24, 35, 39, 0.95); text-decoration: underline; }
.rail-focus-breadcrumb [aria-current="page"] { color: rgba(24, 35, 39, 0.92); font-weight: 650; }
.rail-focus-breadcrumb [aria-current="page"]:only-child {
  font-size: 18px;
  line-height: 1.2;
}
.rail-focus-separator { color: rgba(24, 35, 39, 0.3); }
.rail-model-home > h2,
.rail-responsibility > h2,
.rail-cell-context > h2 {
  color: rgba(24, 35, 39, 0.96);
  font-size: 18px;
  line-height: 1.2;
  margin: 0 0 8px;
}
.rail-model-home-intro { color: rgba(24, 35, 39, 0.72); line-height: 1.45; margin: 0 0 12px; }
.rail-model-home-change-summary {
  color: rgba(37, 91, 84, 0.88);
  font-size: 11px;
  font-weight: 720;
  margin: -4px 0 10px;
}
.rail-all-judgments {
  border-top: 1px solid rgba(24, 35, 39, 0.09);
  margin-top: 12px;
  padding-top: 9px;
}
.rail-all-judgments > summary {
  color: rgba(24, 35, 39, 0.68);
  cursor: pointer;
  font-size: 10px;
  font-weight: 680;
  list-style-position: outside;
  margin-left: 12px;
}
.rail-all-judgments[open] > summary { margin-bottom: 7px; }
.rail-worth-a-look {
  border-top: 1px solid rgba(24, 35, 39, 0.09);
  margin-top: 12px;
  padding-top: 9px;
}
.rail-worth-a-look > summary {
  color: rgba(24, 35, 39, 0.74);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  list-style-position: outside;
  margin-left: 12px;
}
.rail-worth-a-look-list {
  display: grid;
  gap: 1px;
  margin-top: 6px;
}
.rail-worth-a-look-row { min-width: 0; }
.rail-worth-a-look-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(24, 35, 39, 0.07);
  color: rgba(24, 35, 39, 0.88);
  cursor: pointer;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 2px 8px 12px;
  text-align: left;
  width: 100%;
}
.rail-worth-a-look-item:hover { background: rgba(69, 118, 111, 0.06); }
.rail-worth-a-look-item:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(50, 107, 100, 0.55);
  outline-offset: 2px;
}
.rail-worth-a-look-copy { display: grid; gap: 3px; min-width: 0; }
.rail-worth-a-look-copy strong {
  color: rgba(24, 35, 39, 0.84);
  font-size: 10px;
  font-weight: 700;
}
.rail-worth-a-look-copy span {
  color: rgba(24, 35, 39, 0.68);
  font-size: 10.5px;
  line-height: 1.4;
}
.rail-exact-choices {
  border-left: 2px solid rgba(69, 118, 111, 0.28);
  margin: 12px 0 16px;
  padding-left: 10px;
}
.rail-exact-choices > p {
  color: rgba(24, 35, 39, 0.68);
  font-size: 11px;
  line-height: 1.4;
  margin: 0 0 5px;
}
.rail-responsibility-list { display: grid; gap: 1px; }
.rail-responsibility-list > div > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(24, 35, 39, 0.09);
  color: rgba(24, 35, 39, 0.9);
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 2px;
  text-align: left;
}
.rail-responsibility-list > div > button:hover { background: rgba(69, 118, 111, 0.06); }
.rail-responsibility-list > div > button:focus-visible {
  border-radius: 3px;
  outline: 2px solid rgba(50, 107, 100, 0.55);
  outline-offset: 2px;
}
.rail-responsibility-row-copy { display: grid; gap: 2px; min-width: 0; }
.rail-responsibility-list > div > button .rail-responsibility-row-copy strong {
  color: rgba(24, 35, 39, 0.9);
  font-size: 12px;
  font-weight: 620;
}
.rail-responsibility-list > div > button .rail-responsibility-row-copy small {
  color: rgba(24, 35, 39, 0.5);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.rail-responsibility-list > div > button .rail-responsibility-row-arrow {
  color: rgba(24, 35, 39, 0.45);
  font-size: 17px;
  font-weight: 400;
}
.rail-model-home-prompt { color: rgba(24, 35, 39, 0.5); font-size: 11px; margin: 10px 0 0; }
.rail-local-orientation {
  border-left: 2px solid rgba(69, 118, 111, 0.28);
  margin-top: 14px;
  padding: 4px 0 4px 10px;
}
.rail-local-orientation span { color: rgba(24, 35, 39, 0.72); font-size: 10px; font-weight: 700; }
.rail-local-orientation p { color: rgba(24, 35, 39, 0.62); font-size: 11px; margin: 3px 0 6px; }
.rail-local-orientation-compact { align-items: baseline; display: flex; gap: 9px; }
.rail-local-orientation button,
.rail-responsibility-facet button,
.rail-responsibility .analytical-view-actions button,
.rail-responsibility .generated-m0-state button {
  background: transparent;
  border: 0;
  color: #326b64;
  cursor: pointer;
  font: 650 11px/1.3 var(--font);
  padding: 0;
}
.rail-local-orientation-muted { border-left-color: rgba(24, 35, 39, 0.12); }
.rail-back-action {
  background: transparent;
  border: 0;
  color: #326b64;
  cursor: pointer;
  font: 650 11px/1.3 var(--font);
  margin: 0 0 9px;
  padding: 0;
  text-align: left;
}
.rail-back-action:hover { text-decoration: underline; }
.rail-back-action:focus-visible {
  border-radius: 2px;
  outline: 2px solid rgba(50, 107, 100, 0.55);
  outline-offset: 3px;
}
.rail-responsibility-facet {
  border-top: 1px solid rgba(24, 35, 39, 0.09);
  padding: 12px 0;
}
.rail-responsibility-facet h3,
.rail-responsibility-facet summary,
.rail-cell-context h3 {
  color: rgba(24, 35, 39, 0.9);
  font-size: 11px;
  font-weight: 700;
  margin: 0 0 6px;
}
.rail-responsibility-facet p { color: rgba(24, 35, 39, 0.66); font-size: 11px; line-height: 1.45; margin: 4px 0 8px; }
.rail-responsibility-current {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0;
}
.rail-responsibility-current span {
  color: rgba(24, 35, 39, 0.46);
  font-size: 9px;
  text-transform: uppercase;
}
.rail-responsibility-current strong { color: rgba(24, 35, 39, 0.9); font-size: 12px; }
.rail-responsibility-facet .rail-method-invitation {
  color: rgba(24, 35, 39, 0.52);
  font-size: 10px;
  margin: 10px 0 5px;
}
.rail-responsibility-facet button.rail-method-primary-action,
.rail-responsibility .analytical-view-actions button.rail-method-primary-action,
.rail-responsibility .generated-m0-state button.rail-method-primary-action {
  background: #326b64;
  border: 1px solid #326b64;
  border-radius: 4px;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  justify-content: center;
  padding: 7px 10px;
}
.rail-responsibility-facet button.rail-method-primary-action:hover,
.rail-responsibility .analytical-view-actions button.rail-method-primary-action:hover,
.rail-responsibility .generated-m0-state button.rail-method-primary-action:hover { background: #285851; }
/* Method actions in the responsibility detail render outside a facet; they
   take the same quiet and primary Rail treatments, plus pressed and focus. */
.rail-responsibility .analytical-view-actions button:not(.rail-method-primary-action):hover,
.rail-responsibility .generated-m0-state button:not(.rail-method-primary-action):hover { text-decoration: underline; }
/* A quiet action alone on its own line aligns with the prose above it. */
.rail-responsibility .generated-m0-state p > button:only-child { margin-left: 0; }
.rail-responsibility .analytical-view-actions button:active,
.rail-responsibility .generated-m0-state button:active { opacity: 0.78; }
.rail-responsibility .analytical-view-actions button.rail-method-primary-action:active,
.rail-responsibility .generated-m0-state button.rail-method-primary-action:active { background: #214a44; opacity: 1; }
.rail-responsibility .analytical-view-actions button:focus-visible,
.rail-responsibility .generated-m0-state button:focus-visible {
  border-radius: 2px;
  outline: 2px solid rgba(50, 107, 100, 0.55);
  outline-offset: 3px;
}
.rail-responsibility .analytical-view-actions button.rail-method-primary-action:focus-visible,
.rail-responsibility .generated-m0-state button.rail-method-primary-action:focus-visible {
  border-radius: 4px;
  outline-offset: 2px;
}
.rail-responsibility-scope { color: rgba(24, 35, 39, 0.48); font-size: 9px; margin-top: 9px; }
.rail-responsibility-scope summary { cursor: pointer; font-size: 9px; font-weight: 600; }
.rail-responsibility-scope p { font-size: 9px; overflow-wrap: anywhere; }
.rail-responsibility-consequence-posture > h2 {
  margin-bottom: 5px;
}
.rail-responsibility-context-disclosure {
  border-top: 1px solid rgba(24, 35, 39, 0.09);
  padding: 7px 0 0;
}
.rail-responsibility-context-disclosure > summary {
  color: rgba(24, 35, 39, 0.58);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  list-style-position: outside;
  margin-left: 12px;
}
.rail-responsibility-context-disclosure[open] > summary {
  margin-bottom: 3px;
}
.rail-responsibility-context-disclosure > .rail-responsibility-facet:first-of-type {
  margin-top: 6px;
}
.rail-facet-standing { align-items: baseline; display: flex; gap: 7px; }
.rail-facet-standing strong { font-size: 11px; }
.rail-facet-standing span { color: rgba(24, 35, 39, 0.42); font-size: 9px; }
.analytical-view-method-read {
  background: transparent;
  border: 0;
  color: rgba(24, 35, 39, 0.78);
  font: 10px/1.55 var(--mono);
  margin: 8px 0 10px;
  max-height: 220px;
  overflow: auto;
  padding: 0 2px 0 0;
  word-break: break-word;
}
.analytical-view-method-read p,
.analytical-view-method-read ul,
.analytical-view-method-read ol {
  margin: 0 0 8px;
}
.analytical-view-method-read p:last-child,
.analytical-view-method-read ul:last-child,
.analytical-view-method-read ol:last-child {
  margin-bottom: 0;
}
.analytical-view-method-read ul,
.analytical-view-method-read ol {
  padding-left: 16px;
}
.analytical-view-method-read li {
  margin: 0 0 3px;
}
.analytical-view-method-read li:last-child {
  margin-bottom: 0;
}
.analytical-view-method-read .analytical-view-method-label {
  color: inherit;
  font-weight: 650;
  margin: 0 0 3px;
}
.analytical-view-method-read strong {
  font-weight: 650;
}
.analytical-view-method-editor {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(50, 107, 100, 0.28);
  border-radius: 4px;
  color: rgba(24, 35, 39, 0.9);
  display: block;
  font: 10px/1.55 var(--mono);
  min-height: 240px;
  padding: 9px;
  resize: vertical;
  width: 100%;
}
.analytical-view-method-editor:focus {
  border-color: rgba(50, 107, 100, 0.7);
  outline: 1px solid rgba(50, 107, 100, 0.24);
}
.analytical-view-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 10px 0 5px;
}
.analytical-view-scope,
.analytical-view-block {
  border-left: 2px dashed rgba(50, 107, 100, 0.48);
  margin: 10px 0;
  padding: 2px 0 2px 10px;
}
.analytical-view-block { border-left-color: rgba(145, 92, 48, 0.58); }
.analytical-view-scope > strong,
.analytical-view-block > strong { color: rgba(24, 35, 39, 0.9); font-size: 11px; }
.analytical-view-scope details,
.analytical-view-block details,
.analytical-view-method-evidence {
  color: rgba(24, 35, 39, 0.52);
  font-size: 9px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}
.analytical-view-success {
  border-left: 2px solid rgba(50, 107, 100, 0.62);
  color: rgba(37, 91, 84, 0.96) !important;
  font-weight: 680;
  padding-left: 8px;
}
.analytical-view-error { color: #8a3b31 !important; }
.analytical-view-pending,
.analytical-view-message { color: rgba(37, 91, 84, 0.82) !important; }
.rail-cell-context dl { display: grid; gap: 8px; margin: 12px 0; }
.rail-cell-context dl div { display: grid; gap: 2px; }
.rail-cell-context dt { color: rgba(24, 35, 39, 0.44); font-size: 9px; text-transform: uppercase; }
.rail-cell-context dd { color: rgba(24, 35, 39, 0.82); font-size: 11px; margin: 0; overflow-wrap: anywhere; }
.research-shell-title {
  color: rgba(24, 35, 39, 0.92);
  font-size: 13px;
  font-weight: 680;
}
.research-shell-composer {
  /* The composer is the Rail's primary object: one bounded, visibly writable
     surface at the bottom edge, outside the body scroller. Spreadsheet-native
     (a strong boundary, no floating card), with the context line inside it
     and one send control. Governed actions are revealed, never advertised. */
  --rail-composer-border: rgba(31, 42, 46, 0.42);
  background: var(--bg-input, #fff);
  border: 1.5px solid var(--rail-composer-border);
  border-radius: 12px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 4px;
  margin: 6px 0 0;
  min-height: 120px;
  padding: 8px 10px 8px;
  position: relative;
}
.research-shell-composer:focus-within {
  border-color: var(--accent-dark, #314f73);
  outline: 2px solid rgba(49, 79, 115, 0.22);
  outline-offset: 1px;
}
.research-shell-composer[data-rail-composer-mode="note"] {
  --rail-composer-border: var(--accent-dark, #314f73);
  background: rgba(49, 79, 115, 0.045);
}
.rail-composer-context {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  font-size: 11px;
  min-width: 0;
}
.rail-composer-mode-label {
  color: var(--accent-dark, #314f73);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rail-composer-mode-label::after { content: " ·"; color: rgba(67, 84, 91, 0.72); }
.rail-composer-more-wrap { margin-left: auto; position: relative; }
.rail-composer-more {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(67, 84, 91, 0.82);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  line-height: 1;
  padding: 0 6px 3px;
}
.rail-composer-more:hover, .rail-composer-more[aria-expanded="true"] { border-color: var(--border); }
.rail-composer-more:focus-visible { outline: 2px solid rgba(49, 79, 115, 0.5); outline-offset: 1px; }
.rail-composer-menu {
  background: var(--bg-input, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(20, 40, 45, 0.12);
  display: flex;
  flex-direction: column;
  min-width: 148px;
  padding: 4px;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 3;
}
.rail-composer-menu[hidden] { display: none; }
.rail-composer-menu button {
  background: transparent;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  padding: 6px 8px;
  text-align: left;
}
.rail-composer-menu button:hover, .rail-composer-menu button:focus-visible { background: rgba(49, 79, 115, 0.08); outline: none; }
.rail-composer-menu button:disabled { cursor: default; opacity: 0.5; }
.rail-composer-input-row {
  align-items: flex-end;
  display: flex;
  gap: 6px;
  min-width: 0;
}
.rail-composer-send { display: flex; flex: 0 0 auto; }
.rail-composer-send-ask, .rail-composer-send-save {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 30px;
  min-width: 34px;
  padding: 0 9px;
}
.rail-composer-send-ask:enabled, .rail-composer-send-save:enabled {
  background: var(--accent-dark, #314f73);
  border-color: var(--accent-dark, #314f73);
  color: white;
}
.rail-composer-send-save { font-size: 11.5px; letter-spacing: 0.02em; }
.rail-composer-mode-hint {
  color: rgba(67, 84, 91, 0.82);
  font-size: 10.5px;
  margin: 0;
}
.rail-composer-reveals {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}
.rail-composer-reveals:empty { display: none; }
.rail-composer-context > strong {
  color: rgba(24, 35, 39, 0.92);
  font-size: 12px;
  font-weight: 680;
  overflow-wrap: anywhere;
}
.rail-composer-standing {
  color: rgba(67, 84, 91, 0.72);
}
.rail-composer-scope,
.rail-composer-bound button,
.rail-note-shortcut {
  background: transparent;
  border: 0;
  color: var(--accent-dark, #314f73);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  padding: 0;
  text-decoration: underline;
}
.rail-composer-bound {
  color: rgba(67, 84, 91, 0.82);
  font-size: 11px;
  margin: 0;
}
.research-shell-composer-label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.research-shell-input {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: rgba(24, 35, 39, 0.92);
  flex: 1 1 auto;
  font: 12.5px/1.5 var(--font);
  height: 72px;
  max-height: clamp(72px, 20vh, 180px);
  min-height: 72px;
  min-width: 0;
  overflow-y: hidden;
  padding: 4px 2px;
  resize: none;
  width: 100%;
}
/* With the source accessory open, the commentary field yields height so the
   body keeps usable space and the send control stays visible at short viewports. */
.research-shell-composer:has(.rail-composer-source[open]) .research-shell-input {
  max-height: clamp(72px, 12vh, 110px);
}
.research-shell-input::placeholder {
  color: rgba(67, 84, 91, 0.62);
  opacity: 1;
}
.research-shell-input:focus { outline: none; }
#rail-composer-source:focus {
  border-color: var(--accent-dark, #314f73);
  outline: 2px solid rgba(49, 79, 115, 0.35);
  outline-offset: 1px;
}
.research-shell-input:read-only,
#rail-composer-source:read-only {
  opacity: 0.7;
}
.rail-composer-source {
  border-top: 1px dashed rgba(31, 42, 46, 0.18);
  font-size: 11px;
  padding-top: 4px;
}
.rail-composer-source[hidden] { display: none; }
.rail-composer-source > summary {
  color: rgba(67, 84, 91, 0.82);
  cursor: pointer;
}
.rail-composer-source label {
  color: rgba(67, 84, 91, 0.82);
  display: block;
  margin: 4px 0;
}
#rail-composer-source {
  background: var(--bg-input, #fff);
  border: 1px solid var(--border);
  color: rgba(24, 35, 39, 0.92);
  font: 12px/1.5 var(--font);
  max-height: clamp(40px, 8vh, 120px);
  padding: 6px 8px;
  resize: vertical;
  width: 100%;
}
.rail-composer-verb {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--fg);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 9px;
}
.rail-composer-verb:disabled { cursor: default; opacity: 0.5; }
.rail-composer-verb-update:enabled { background: var(--accent-dark, #314f73); color: white; }
.rail-composer-verb:focus-visible {
  outline: 2px solid rgba(49, 79, 115, 0.5);
  outline-offset: 1px;
}
.rail-composer-pending {
  color: rgba(80, 88, 96, 0.72);
  font-size: 11px;
  font-style: italic;
  margin: 0;
}
.research-shell-composer .research-shell-status {
  font-size: 11px;
  min-height: 0;
}
.research-shell-composer .research-shell-status.error { color: var(--error); }
.research-shell-composer .research-shell-status.ok { color: rgba(67, 84, 91, 0.92); }
.rail-composer-disposition {
  border: 1px solid var(--border);
  font-size: 11px;
  padding: 8px;
}
.rail-composer-disposition p { margin: 0 0 6px; }
.rail-composer-disposition button {
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  margin: 0 4px 4px 0;
  padding: 4px 7px;
}
.rail-ask-answers { border-top: 1px solid var(--border); margin: 10px 0 0; padding-top: 8px; }
.rail-ask-answers h3 { margin-bottom: 6px; }
.rail-answer-actions { display: flex; justify-content: flex-end; margin: 2px 0 8px; }
.rail-save-note {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--accent-dark, #314f73);
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  padding: 3px 8px;
}
.rail-save-note:hover, .rail-save-note:focus-visible { background: rgba(49, 79, 115, 0.08); outline: none; }
/* Rail model sandbox: proposal card, Run outcome, thread banner. */
.rail-sandbox-proposal, .rail-sandbox-run { border: 1px solid var(--border); border-radius: 8px; margin: 8px 0; padding: 8px 10px; }
.rail-sandbox-proposal[data-sandbox-standing="refused"], .rail-sandbox-run[data-sandbox-run-refused] { border-color: rgba(160, 60, 40, 0.5); }
.rail-sandbox-table { border-collapse: collapse; font-size: 11px; margin: 6px 0; width: 100%; }
.rail-sandbox-table th, .rail-sandbox-table td { border-bottom: 1px solid var(--border); padding: 3px 6px; text-align: right; vertical-align: top; }
.rail-sandbox-table th:first-child, .rail-sandbox-table td:first-child { text-align: left; }
.rail-sandbox-table small { color: var(--muted, #6b7280); }
.rail-sandbox-refusals ul { margin: 4px 0 0 16px; padding: 0; }
.rail-sandbox-consequences { color: var(--muted, #6b7280); font-size: 11px; margin: 6px 0; }
.rail-sandbox-run button, .rail-sandbox-proposal button { background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--accent-dark, #314f73); cursor: pointer; font: inherit; font-size: 10.5px; margin-left: 6px; padding: 3px 8px; }
.rail-sandbox-proposal .rail-sandbox-run { background: var(--accent-dark, #314f73); color: #fff; }
.rail-sandbox-proposal .rail-sandbox-run:disabled { opacity: 0.55; cursor: default; }
.rail-sandbox-banner { background: rgba(49, 79, 115, 0.08); border-left: 3px solid var(--accent-dark, #314f73); font-size: 11px; margin: 6px 0; padding: 4px 8px; }
.rail-sandbox-interpretation { font-size: 12px; margin: 6px 0; }
.rail-sandbox-interpretation p { margin: 4px 0; }
.rail-sandbox-interpretation[data-standing="pending"] { color: var(--muted, #6b7280); }
.rail-sandbox-interpretation[data-standing="unavailable"] { border-left: 3px solid rgba(160, 60, 40, 0.5); padding-left: 8px; }
.rail-sandbox-key-metrics-scroll { contain: inline-size; overflow-x: auto; margin: 6px 0; }
.rail-sandbox-key-metrics { white-space: nowrap; width: auto; min-width: 100%; }
.rail-sandbox-key-metrics thead th { position: sticky; top: 0; background: var(--panel, #fff); }
.rail-sandbox-metric-head th { text-align: left; font-weight: 600; padding-top: 6px; }
.rail-sandbox-run details { margin: 4px 0; }
.rail-sandbox-run details > summary { cursor: pointer; font-size: 11px; color: var(--accent-dark, #314f73); }
.rail-sandbox-run details details > summary { color: var(--muted, #6b7280); }
body.zone-mode:not(.model-home-active) .rail-save-note { border-color: rgba(216, 230, 236, 0.28); color: rgba(142, 202, 214, 0.92); }
.rail-note-list > summary { cursor: pointer; font-size: 10px; color: rgba(116, 123, 132, 0.76); font-weight: 520; }
.rail-note-list[open] > summary { margin-bottom: 6px; }
.rail-note-list-empty { color: var(--fg-dim); }
.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;
}



/* ─── 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);
  }
}

.dot-ok    { background: var(--success); }
.dot-stale { background: var(--dirty); }
.dot-fail  { background: var(--error); }
.dot-unknown { background: 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);
}
/* ─── 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;
}


/* ─── 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;
}


.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; }

/* ─── 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); }


/* ─── 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-summary .import-summary-heading {
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 8px;
  text-transform: uppercase;
}
#import-summary .canonical-import-receipt,
#import-summary .canonical-import-empty {
  color: var(--fg-dim);
  font-size: 9px;
  margin-top: 8px;
  overflow-wrap: anywhere;
}

/* ─── 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);
}









/* ─── 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;
}




/* ─── 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;
}
.ctx-submenu-host {
  position: relative;
}
.ctx-submenu-label {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 14px;
  font-size: 11px;
  color: var(--fg-muted);
  cursor: default;
  white-space: nowrap;
}
.ctx-submenu-host:hover > .ctx-submenu-label,
.ctx-submenu-host:focus-within > .ctx-submenu-label {
  background: rgba(255,255,255,0.06);
  color: var(--fg);
}
.ctx-submenu {
  display: none;
  position: absolute;
  left: calc(100% - 2px);
  top: -4px;
  min-width: 120px;
  padding: 4px 0;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.ctx-submenu-host:hover > .ctx-submenu,
.ctx-submenu-host:focus-within > .ctx-submenu {
  display: block;
}

/* ─── KPI Lookup Inspector ─── */

.primary-work-area:has(#kpi-lookup-inspector:not([hidden])) {
  flex-direction: row;
  gap: 10px;
}

.kpi-lookup-inspector {
  color-scheme: light;
  --bg-input: #FFFFFF;
  --surface: #FFFFFF;
  --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;
  --select: #54789C;
  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-request-field {
  display: grid;
  gap: 4px;
  color: var(--fg-dim);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.kpi-lookup-request-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg-input);
  color: var(--fg);
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 8px;
  text-transform: none;
}

.kpi-lookup-request-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(84, 120, 156, 0.18);
  outline: none;
}

.kpi-lookup-validation {
  color: #9B2C3F;
  font-size: 11px;
  line-height: 1.35;
}

.kpi-lookup-submit {
  align-self: flex-start;
}

.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-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);
}


















/* ═════════════════════════════════════════════
   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 {
  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:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 0;
}

body.focus-mode-active:not(.model-home-active) #main:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
))::before {
  bottom: 0;
}

body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) {
  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) .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);
}

body.zone-mode:not(.model-home-active) .rail-focus-breadcrumb,
body.zone-mode:not(.model-home-active) .rail-responsibility-list > div > button span,
body.zone-mode:not(.model-home-active) .rail-model-home-prompt,
body.zone-mode:not(.model-home-active) .rail-local-orientation p,
body.zone-mode:not(.model-home-active) .rail-responsibility-facet p,
body.zone-mode:not(.model-home-active) .rail-facet-standing span,
body.zone-mode:not(.model-home-active) .rail-responsibility-current span,
body.zone-mode:not(.model-home-active) .rail-method-model-input-range,
body.zone-mode:not(.model-home-active) .rail-responsibility-scope,
body.zone-mode:not(.model-home-active) .rail-exact-choices > p,
body.zone-mode:not(.model-home-active) .rail-cell-context dt {
  color: rgba(216, 230, 236, 0.66);
}

body.zone-mode:not(.model-home-active) .rail-focus-breadcrumb button:hover,
body.zone-mode:not(.model-home-active) .rail-focus-breadcrumb [aria-current="page"],
body.zone-mode:not(.model-home-active) .rail-model-home > h2,
body.zone-mode:not(.model-home-active) .rail-responsibility > h2,
body.zone-mode:not(.model-home-active) .rail-cell-context > h2,
body.zone-mode:not(.model-home-active) .rail-responsibility-list > div > button,
body.zone-mode:not(.model-home-active) .rail-local-orientation span,
body.zone-mode:not(.model-home-active) .rail-responsibility-facet h3,
body.zone-mode:not(.model-home-active) .rail-responsibility-facet summary,
body.zone-mode:not(.model-home-active) .rail-all-judgments > summary,
body.zone-mode:not(.model-home-active) .rail-responsibility-current strong,
body.zone-mode:not(.model-home-active) .rail-method-model-input-label,
body.zone-mode:not(.model-home-active) .rail-cell-context h3,
body.zone-mode:not(.model-home-active) .rail-cell-context dd {
  color: rgba(248, 246, 241, 0.92);
}

body.zone-mode:not(.model-home-active) .rail-model-home-intro {
  color: rgba(248, 246, 241, 0.78);
}

/* The Method document in the responsibility detail sits outside a facet, so
   its light-theme ink needs the same dark-theme Rail text colors. */
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-thinks p {
  color: rgba(248, 246, 241, 0.92);
}
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-state,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-instructions > p,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-approach-block p,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-why-researched p,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-external-research p,
body.zone-mode:not(.model-home-active) .rail-responsibility .rail-method-model-input-values {
  color: rgba(248, 246, 241, 0.78);
}
body.zone-mode:not(.model-home-active) .rail-responsibility .rail-method-label,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-method h3,
body.zone-mode:not(.model-home-active) .rail-responsibility .rail-method-model-inputs > summary,
body.zone-mode:not(.model-home-active) .rail-responsibility .rail-method-model-input-header {
  color: rgba(216, 230, 236, 0.66);
}
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-source a {
  color: rgba(169, 214, 216, 0.94);
}

body.zone-mode:not(.model-home-active) .rail-model-home-change-summary {
  color: rgba(185, 224, 216, 0.88);
}

body.zone-mode:not(.model-home-active) .rail-responsibility-list > div > button .rail-responsibility-row-copy strong {
  color: rgba(248, 246, 241, 0.92);
}

body.zone-mode:not(.model-home-active) .rail-responsibility-list > div > button .rail-responsibility-row-copy small,
body.zone-mode:not(.model-home-active) .rail-responsibility-list > div > button .rail-responsibility-row-arrow {
  color: rgba(216, 230, 236, 0.62);
}

body.zone-mode:not(.model-home-active) .rail-focus-separator {
  color: rgba(216, 230, 236, 0.34);
}

body.zone-mode:not(.model-home-active) .rail-responsibility-list > div > button,
body.zone-mode:not(.model-home-active) .rail-responsibility-facet {
  border-color: rgba(216, 230, 236, 0.14);
}

body.zone-mode:not(.model-home-active) .rail-responsibility-list > div > button:hover {
  background: rgba(216, 230, 236, 0.07);
}

body.zone-mode:not(.model-home-active) .rail-local-orientation {
  border-left-color: rgba(169, 189, 201, 0.48);
}

body.zone-mode:not(.model-home-active) .rail-exact-choices {
  border-left-color: rgba(169, 189, 201, 0.48);
}

body.zone-mode:not(.model-home-active) .rail-local-orientation-muted {
  border-left-color: rgba(216, 230, 236, 0.20);
}

body.zone-mode:not(.model-home-active) .rail-local-orientation button,
body.zone-mode:not(.model-home-active) .rail-responsibility-facet button,
body.zone-mode:not(.model-home-active) .rail-responsibility .analytical-view-actions button,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-state button,
body.zone-mode:not(.model-home-active) .rail-back-action {
  color: rgba(169, 214, 216, 0.94);
}
body.zone-mode:not(.model-home-active) .rail-responsibility-facet button.rail-method-primary-action,
body.zone-mode:not(.model-home-active) .rail-responsibility .analytical-view-actions button.rail-method-primary-action,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-state button.rail-method-primary-action {
  background: rgba(169, 214, 216, 0.92);
  border-color: rgba(169, 214, 216, 0.92);
  color: rgba(6, 42, 67, 0.96);
}
body.zone-mode:not(.model-home-active) .rail-responsibility-facet button.rail-method-primary-action:hover,
body.zone-mode:not(.model-home-active) .rail-responsibility .analytical-view-actions button.rail-method-primary-action:hover,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-state button.rail-method-primary-action:hover {
  background: rgba(198, 231, 232, 0.98);
  border-color: rgba(198, 231, 232, 0.98);
}
body.zone-mode:not(.model-home-active) .rail-responsibility .analytical-view-actions button.rail-method-primary-action:active,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-state button.rail-method-primary-action:active {
  background: rgba(138, 188, 192, 0.94);
  border-color: rgba(138, 188, 192, 0.94);
}
body.zone-mode:not(.model-home-active) .rail-responsibility .analytical-view-actions button:focus-visible,
body.zone-mode:not(.model-home-active) .rail-responsibility .generated-m0-state button:focus-visible {
  outline-color: rgba(169, 214, 216, 0.72);
}
body.zone-mode:not(.model-home-active) .analytical-view-method-read,
body.zone-mode:not(.model-home-active) .analytical-view-method-editor,
body.zone-mode:not(.model-home-active) .analytical-view-scope > strong,
body.zone-mode:not(.model-home-active) .analytical-view-block > strong {
  color: rgba(248, 246, 241, 0.9);
}
body.zone-mode:not(.model-home-active) .analytical-view-method-editor {
  background: rgba(8, 37, 57, 0.36);
  border-color: rgba(169, 214, 216, 0.42);
}
body.zone-mode:not(.model-home-active) .analytical-view-success,
body.zone-mode:not(.model-home-active) .analytical-view-message,
body.zone-mode:not(.model-home-active) .analytical-view-pending {
  color: rgba(185, 224, 216, 0.96) !important;
}
/* ─── 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) #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) .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) #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) .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) #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) .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) #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) .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) #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) #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) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  background: transparent;
}

body.zone-mode:not(.model-home-active) #main::before {
  background: rgba(216, 230, 236, 0.22);
}



/* ─── 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) #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) #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.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 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) .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) #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) #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) .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) #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) .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) #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) #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) .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) #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) .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) #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);
}

/* Composer object in the zone medium: same boundary, dark surface, legible
   context line, send control and hint. Presentation only. */
body.zone-mode:not(.model-home-active) .research-shell-composer {
  --rail-composer-border: rgba(216, 230, 236, 0.42);
  background: rgba(255, 255, 255, 0.05);
}
body.zone-mode:not(.model-home-active) .research-shell-composer:focus-within {
  border-color: rgba(216, 230, 236, 0.78);
  outline-color: rgba(216, 230, 236, 0.22);
}
body.zone-mode:not(.model-home-active) .research-shell-composer[data-rail-composer-mode="note"] {
  --rail-composer-border: rgba(142, 202, 214, 0.86);
  background: rgba(142, 202, 214, 0.08);
}
body.zone-mode:not(.model-home-active) .rail-composer-context > strong,
body.zone-mode:not(.model-home-active) .rail-composer-mode-label {
  color: rgba(248, 246, 241, 0.92);
}
body.zone-mode:not(.model-home-active) .rail-composer-standing,
body.zone-mode:not(.model-home-active) .rail-composer-mode-hint,
body.zone-mode:not(.model-home-active) .rail-composer-bound,
body.zone-mode:not(.model-home-active) .rail-composer-source > summary,
body.zone-mode:not(.model-home-active) .rail-composer-source label,
body.zone-mode:not(.model-home-active) .rail-composer-more {
  color: rgba(216, 230, 236, 0.72);
}
body.zone-mode:not(.model-home-active) .rail-composer-scope,
body.zone-mode:not(.model-home-active) .rail-composer-bound button {
  color: rgba(142, 202, 214, 0.92);
}
body.zone-mode:not(.model-home-active) .rail-composer-more:hover,
body.zone-mode:not(.model-home-active) .rail-composer-more[aria-expanded="true"] {
  border-color: rgba(216, 230, 236, 0.32);
}
body.zone-mode:not(.model-home-active) .rail-composer-menu {
  background: rgba(24, 40, 52, 0.98);
  border-color: rgba(216, 230, 236, 0.28);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
body.zone-mode:not(.model-home-active) .rail-composer-menu button { color: rgba(248, 246, 241, 0.9); }
body.zone-mode:not(.model-home-active) .rail-composer-menu button:hover,
body.zone-mode:not(.model-home-active) .rail-composer-menu button:focus-visible { background: rgba(216, 230, 236, 0.12); }
body.zone-mode:not(.model-home-active) .rail-composer-send-ask,
body.zone-mode:not(.model-home-active) .rail-composer-send-save {
  background: rgba(216, 230, 236, 0.10);
  border-color: rgba(216, 230, 236, 0.32);
  color: rgba(248, 246, 241, 0.9);
}
body.zone-mode:not(.model-home-active) .rail-composer-send-ask:enabled,
body.zone-mode:not(.model-home-active) .rail-composer-send-save:enabled {
  background: rgba(142, 202, 214, 0.92);
  border-color: rgba(142, 202, 214, 0.92);
  color: #10222c;
}
body.zone-mode:not(.model-home-active) .rail-composer-verb {
  background: rgba(216, 230, 236, 0.08);
  border-color: rgba(216, 230, 236, 0.28);
  color: rgba(248, 246, 241, 0.9);
}
body.zone-mode:not(.model-home-active) .rail-composer-verb-update:enabled {
  background: rgba(142, 202, 214, 0.92);
  border-color: rgba(142, 202, 214, 0.92);
  color: #10222c;
}
body.zone-mode:not(.model-home-active) #rail-composer-source {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(216, 230, 236, 0.28);
  color: rgba(248, 246, 241, 0.88);
}
body.zone-mode:not(.model-home-active) .rail-composer-source { border-top-color: rgba(216, 230, 236, 0.18); }
body.zone-mode:not(.model-home-active) .rail-note-list > summary { color: rgba(216, 230, 236, 0.62); }

/* ─── 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) #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) #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) .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) #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) .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) #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) .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) #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) .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) #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) #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) #sheet-tabs,
body.zone-mode:not(.model-home-active) #bottombar {
  background: transparent;
}

body.zone-mode:not(.model-home-active) #main::before {
  background: rgba(216, 230, 236, 0.22);
}


/* ─── 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) #manual-actions,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select {
  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);
}









/* ─── 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;
}






/* ─── 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 {
  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) #manual-actions,
body:not(.model-home-active) #btn-zone-mode,
body:not(.model-home-active) #snap-chip,
body:not(.model-home-active) #version-select {
  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;
}







/* ─── 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;
}























/* ─── 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;
}



























/* ─── 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) #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-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}

body:not(.model-home-active) .research-shell-transcript {
  overflow: visible;
  padding-right: 0;
}

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) #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:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) {
  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(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) > :not(:has(#model-workflow-next-action-button)),
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .artifact-review-section,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .run-readiness-items,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .run-lifecycle-summary,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .run-context-line,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .workflow-state-title {
  display: none !important;
}

body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .panel-section:has(#model-workflow-next-action-button),
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .results-surface,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .run-activity-section,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) #workflow-state-strip,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) #model-workflow-state-summary {
  display: block !important;
}

body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .results-surface,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .run-activity-section,
body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) #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:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) #model-workflow-state-summary {
  grid-template-columns: 1fr;
}

body.focus-mode-active:not(.model-home-active) #side-panel:not(:has(
  #iris-prediction-records > [data-rail-focus="RESPONSIBILITY"]
)) .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);
}


body.zone-mode:not(.model-home-active) #main::before {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  content: none !important;
}
















/* Login is a bounded state of the existing Search shell. */
body.login-active #app > :not(#menubar):not(#login-entry) { display: none !important; }
body.login-active #menubar-left > :not(#brand-lockup),
body.login-active #menubar-right > * { display: none !important; }
.login-entry-layout { align-items: center; justify-content: center; }
.login-entry-shell { max-width: 520px; }
.login-form { display: grid; gap: 8px; margin-top: 22px; }
.login-form .model-home-search-label {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
  color: #314f73;
  font: 650 11px/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.login-form .model-home-search-label:not(:first-child) { margin-top: 8px; }
.login-input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(49, 79, 115, 0.76);
  background: rgba(255, 255, 255, 0.68);
  color: #314f73;
  font: 560 14px/1 var(--mono);
  line-height: normal;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}
.login-input::placeholder { color: rgba(49, 79, 115, 0.62); }
.login-input:hover { border-color: rgba(49, 79, 115, 0.92); }
.login-input:focus {
  border-color: #314f73;
  box-shadow:
    0 0 0 2px rgba(49, 79, 115, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
}
.login-submit {
  justify-self: start;
  min-height: 40px;
  margin-top: 8px;
  padding: 0 20px;
  border: 1px solid #314f73;
  background: rgba(49, 79, 115, 0.08);
  color: #314f73;
  font: 650 11px/1 var(--mono);
  letter-spacing: 0.10em;
  text-transform: uppercase;
}
.login-submit:hover,
.login-submit:focus {
  border-color: #314f73;
  background: #314f73;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 0 0 2px rgba(49, 79, 115, 0.14);
}
.login-error { min-height: 1.4em; margin: 0; color: var(--danger, #b4233b); }







/* Timeline is also a customer review surface: keep canonical history primary. */
body[data-workspace-surface="timeline"] #main {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
}

body[data-workspace-surface="timeline"] #side-panel,
body[data-workspace-surface="timeline"] #bottombar,
body[data-workspace-surface="timeline"] #dirty-chip,
body[data-workspace-surface="timeline"] #model-run-state-chip,
body[data-workspace-surface="timeline"] #snap-chip,
body[data-workspace-surface="timeline"] #health-chip,
body[data-workspace-surface="timeline"] #manual-actions {
  display: none !important;
}

body[data-workspace-surface="timeline"] #main::before {
  display: none !important;
}

body[data-workspace-surface="timeline"] .timeline-lineage-node {
  width: 122px;
}

body[data-workspace-surface="timeline"] #timeline-lineage-surface {
  width: 100%;
  max-width: none;
}

body[data-workspace-surface="timeline"] .timeline-surface:not([hidden]) {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
  padding: clamp(24px, 3vw, 42px);
}

body[data-workspace-surface="timeline"] .timeline-surface > * {
  width: min(100%, 1120px);
}

body[data-workspace-surface="timeline"] .timeline-lineage-status,
body[data-workspace-surface="timeline"] .timeline-period-summary,
body[data-workspace-surface="timeline"] #repository-version-history {
  font-size: 12px;
}

/* Phase 1A governed Find / Show result composition. */
.research-shell-find-show-result { min-width: 0; }
.research-shell-find-show-item,
.research-shell-find-show-table-row {
  border-top: 1px solid var(--line, rgba(127, 127, 127, 0.2));
  padding: 7px 0;
}
.research-shell-find-show-table-row {
  display: grid;
  grid-template-columns: minmax(7rem, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
}
.research-shell-find-show-table-row em {
  overflow-wrap: anywhere;
  text-align: right;
}
.research-shell-find-show-empty { margin: 8px 0 0; }
.research-shell-find-show-scope { margin-top: 10px; }
/* IRIS Model State Ledger — restored pre-recomposition worksheet lower frame. */
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 {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: 0.80fr 1.58fr 1.08fr 1.12fr 2.24fr 0.82fr;
  grid-template-rows: 1fr;
  min-height: 194px;
  max-height: 194px;
  padding: 0;
  overflow: hidden;
  pointer-events: auto;
  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: 1px solid rgba(49, 79, 115, 0.18);
  color: rgba(31, 48, 70, 0.78);
}

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) .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: 11px 12px;
  border-right: 1px solid rgba(49, 79, 115, 0.13);
}

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: 58px 1fr;
  align-items: start;
  justify-items: center;
  padding-top: 12px;
  text-align: center;
}

body:not(.model-home-active) .model-state-ledger-rm-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(49, 79, 115, 0.25);
  border-radius: 50%;
  color: rgba(49, 79, 115, 0.50);
  font-family: Georgia, serif;
  font-size: 25px;
  letter-spacing: 0.04em;
}

body:not(.model-home-active) .model-state-ledger-maker {
  display: grid;
  gap: 5px;
  color: rgba(49, 79, 115, 0.48);
  font-size: 7.5px;
  letter-spacing: 0.12em;
  line-height: 1.18;
  text-transform: uppercase;
}

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;
  line-height: 1;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-state-ledger-model-name {
  margin-bottom: 13px;
  overflow: hidden;
  color: rgba(31, 48, 70, 0.78);
  font-size: 15px;
  font-weight: 540;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.model-home-active) .model-state-ledger-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

body:not(.model-home-active) .model-state-ledger-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

body:not(.model-home-active) .model-state-ledger-label {
  overflow: hidden;
  color: rgba(49, 79, 115, 0.38);
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-overflow: ellipsis;
  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.70);
  font-size: 10px;
  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: 9px;
}

body:not(.model-home-active) .model-state-ledger-note {
  padding-bottom: 6px;
  overflow: hidden;
  border-bottom: 1px solid rgba(49, 79, 115, 0.10);
  color: rgba(31, 48, 70, 0.66);
  font-size: 10px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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.48fr 1.08fr minmax(0, 2.55fr) 0.62fr;
  min-width: 0;
  border-bottom: 1px solid 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 {
  min-width: 0;
  padding: 6px 7px 5px 0;
  overflow: hidden;
  border-right: 1px solid rgba(49, 79, 115, 0.08);
  color: rgba(31, 48, 70, 0.66);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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;
  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 {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 32px;
  padding: 7px 12px 6px;
  border: 1px solid rgba(49, 79, 115, 0.42);
  background: rgba(49, 79, 115, 0.07);
  color: rgba(20, 33, 38, 0.98);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.04em;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

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);
}

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;
  overflow: hidden;
  border-top: 1px solid rgba(49, 79, 115, 0.07);
  color: rgba(49, 79, 115, 0.36);
  font-size: 8.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.focus-mode-active:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block,
body[data-workspace-surface="timeline"] #instrument-title-block-placeholder {
  display: none !important;
}

body.zone-mode:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  background: #07334F;
  border-top-color: rgba(216, 230, 236, 0.22);
  color: rgba(236, 248, 252, 0.72);
}

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: rgba(216, 230, 236, 0.22);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-rm-mark {
  border-color: rgba(236, 248, 252, 0.38);
  color: rgba(249, 253, 255, 0.72);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-maker,
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: rgba(216, 230, 236, 0.58);
}

body.zone-mode:not(.model-home-active) .model-state-ledger-model-name,
body.zone-mode:not(.model-home-active) .model-state-ledger-value {
  color: rgba(249, 253, 255, 0.88);
}

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: rgba(236, 248, 252, 0.72);
  border-bottom-color: rgba(216, 230, 236, 0.14);
}

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: rgba(216, 230, 236, 0.14);
  color: rgba(216, 230, 236, 0.42);
}

/* Session exit remains reachable when Search hides the product menubar. */
.session-logout {
  position: fixed;
  top: max(30px, calc(env(safe-area-inset-top) + 22px));
  right: max(32px, calc(env(safe-area-inset-right) + 22px));
  z-index: 100;
  padding: 3px 7px;
  border: 1px solid rgba(49, 79, 115, 0.20);
  border-radius: 3px;
  background: rgba(248, 246, 241, 0.76);
  color: rgba(49, 79, 115, 0.68);
  font: 500 10px/1.2 var(--font);
  cursor: pointer;
  opacity: 0.78;
  backdrop-filter: blur(4px);
}

.session-logout[hidden] {
  display: none;
}

.session-logout:hover {
  border-color: rgba(49, 79, 115, 0.38);
  color: rgba(49, 79, 115, 0.94);
  opacity: 1;
}

.session-logout:focus-visible {
  outline: 2px solid rgba(84, 120, 156, 0.72);
  outline-offset: 2px;
}

body.zone-mode:not(.model-home-active) .session-logout {
  border-color: rgba(216, 230, 236, 0.22);
  background: rgba(6, 42, 67, 0.76);
  color: rgba(216, 230, 236, 0.74);
}

body:not(.model-home-active) #menubar-right {
  padding-right: 58px;
}

.research-shell-advancement-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
/* Existing Method read surface: analytical presentation over the durable inferred prior. */
#llm-formula-modal.inferred-method-active { width: min(880px, calc(100vw - 64px)); height: auto; max-height: calc(100vh - 64px); padding: 18px 22px; }
#llm-formula-modal.inferred-method-active .llm-method-editor { overflow: auto; }
#llm-formula-modal.inferred-method-active .llm-method-document-header,
#llm-formula-modal.inferred-method-active .llm-method-orientation,
#llm-formula-modal.inferred-method-active .llm-method-read-surface,
#llm-formula-modal.inferred-method-active #llm-method-copy { display: none !important; }
#llm-formula-modal.inferred-method-active #llm-method-edit-pane:not([hidden]) {
  flex: 0 0 auto;
  width: min(740px, 100%);
  min-height: clamp(300px, 42vh, 420px);
  margin: 0 auto;
}
#llm-formula-modal.inferred-method-active #llm-method-edit-pane:not([hidden]) #llm-method-markdown {
  min-height: clamp(280px, 40vh, 400px);
}
.llm-inferred-method-prior { display: grid; gap: 16px; width: min(740px, 100%); margin: 22px auto 24px; }
.llm-inferred-method-prior[hidden] { display: none; }
.llm-inferred-method-summary[hidden],
.llm-inferred-method-evidence[hidden] { display: none; }
.llm-inferred-method-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.llm-inferred-method-heading h3 { margin: 4px 0 0; font-size: 22px; font-weight: 620; letter-spacing: -.01em; }
.llm-inferred-method-kicker { display: block; color: var(--ink-muted, #6f747b); font-size: 10px; font-weight: 650; letter-spacing: .14em; }
.llm-inferred-method-origin { color: var(--ink-muted, #6f747b); font-size: 11px; font-weight: 600; }
.llm-inferred-method-enrichment { display: grid; gap: 3px; margin: 14px 0 4px; padding: 10px 12px; border-left: 2px solid rgba(64, 111, 128, .24); background: rgba(64, 111, 128, .04); }
.llm-inferred-method-enrichment[hidden] { display: none; }
.llm-inferred-method-enrichment strong { color: var(--ink, #1d252b); font-size: 13px; font-weight: 620; }
.llm-inferred-method-enrichment span { color: var(--ink-muted, #6f747b); font-size: 12px; line-height: 1.4; }
.llm-inferred-method-enrichment[data-state="unavailable"],
.llm-inferred-method-enrichment[data-state="stale"] { background: rgba(100, 100, 100, .04); border-color: rgba(100, 100, 100, .16); }
.llm-inferred-method-research-need,
.llm-inferred-method-external-research { display: grid; gap: 7px; padding: 12px; border-left: 2px solid rgba(64, 111, 128, .35); background: rgba(64, 111, 128, .05); }
.llm-inferred-method-research-need[hidden],
.llm-inferred-method-external-research[hidden] { display: none; }
.llm-inferred-method-research-need p,
.llm-inferred-method-external-research p { margin: 0; color: var(--ink-muted, #6f747b); font-size: 12px; line-height: 1.45; }
.llm-inferred-method-external-research h4 { margin: 0; font-size: 13px; }
.llm-inferred-method-external-research-list { display: grid; gap: 9px; }
.llm-inferred-method-external-research-list article { display: grid; gap: 3px; padding-top: 8px; border-top: 1px solid rgba(64, 111, 128, .16); }
.llm-inferred-method-summary { min-width: 0; margin: 0; }
.llm-inferred-method-canonical-content { display: grid; gap: 10px; }
.llm-inferred-method-canonical-content h1,
.llm-inferred-method-canonical-content h2,
.llm-inferred-method-canonical-content h3,
.llm-inferred-method-canonical-content h4 { margin: 10px 0 0; font-size: 12px; font-weight: 650; letter-spacing: 0; }
.llm-inferred-method-canonical-content > :first-child { margin-top: 0; }
.llm-inferred-method-canonical-content p { max-width: 76ch; margin: 0; color: var(--ink, #202124); font-size: 14px; line-height: 1.62; }
.llm-inferred-method-canonical-content ul,
.llm-inferred-method-canonical-content ol { display: grid; gap: 5px; margin: 0; padding-left: 20px; color: var(--ink, #202124); font-size: 13px; line-height: 1.55; }
.llm-inferred-method-baseline { scroll-margin-top: 12px; border-top: 1px solid var(--line, #d9d9d9); padding-top: 12px; }
.llm-inferred-method-baseline > summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.llm-inferred-method-baseline pre { min-height: min(180px, 22vh); max-height: 280px; overflow: auto; margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink, #202124); font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.llm-inferred-method-evidence { border-top: 1px solid var(--line, #d9d9d9); padding-top: 12px; }
.llm-inferred-method-evidence > summary,
.llm-inferred-method-run-proof summary,
.llm-inferred-method-model-diff summary,
.llm-inferred-method-learning-record summary { cursor: pointer; font-size: 12px; font-weight: 600; }
.llm-inferred-method-evidence-list { display: grid; margin-top: 12px; }
.llm-inferred-method-evidence-item { display: grid; gap: 5px; padding: 12px 0; border-top: 1px solid rgba(127, 127, 127, .18); }
.llm-inferred-method-evidence-item header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.llm-inferred-method-evidence-item strong { font-size: 13px; }
.llm-inferred-method-evidence-state { color: var(--ink-muted, #6f747b); font-size: 10px; font-weight: 500; }
.llm-inferred-method-evidence-item code { overflow-wrap: anywhere; white-space: pre-wrap; color: var(--ink-muted, #6f747b); font-size: 10px; }
.llm-inferred-method-evidence-item p { margin: 0; color: var(--ink-muted, #6f747b); font-size: 11px; line-height: 1.45; }
.llm-inferred-method-evidence-item > details { margin-top: 3px; color: var(--ink-muted, #6f747b); font-size: 10px; }
.llm-inferred-method-evidence-item > details > div { display: grid; gap: 5px; margin-top: 6px; }
.llm-inferred-method-evidence-meaning { color: var(--ink, #202124) !important; font-size: 12px !important; }
.llm-inferred-method-limitations { margin-top: 14px; border-top: 1px solid var(--line, #d9d9d9); padding-top: 12px; }
.llm-inferred-method-limitations h4,
.llm-inferred-method-full h4 { margin: 0; font-size: 12px; font-weight: 620; }
.llm-inferred-method-limitations ul { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.llm-inferred-method-limitations li { display: grid; gap: 2px; color: var(--ink-muted, #6f747b); font-size: 11px; line-height: 1.5; }
.llm-inferred-method-limitations li strong { color: var(--ink, #202124); font-size: 12px; }
.llm-inferred-method-delta { border-top: 1px solid var(--line, #d9d9d9); padding-top: 16px; }
.llm-inferred-method-delta h4 { margin: 0 0 10px; font-size: 18px; font-weight: 620; }
.llm-inferred-method-delta p { margin: 0 0 8px; color: var(--ink-muted, #6f747b); font-size: 11px; line-height: 1.5; }
.llm-inferred-method-delta .llm-inferred-method-analyst-judgment { color: var(--ink, #202124); font-size: 14px; line-height: 1.6; }
.llm-inferred-method-full { margin-top: 14px; border-top: 1px solid var(--line, #d9d9d9); padding-top: 12px; }
.llm-inferred-method-full pre { max-height: 300px; overflow: auto; margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.llm-inferred-method-run-proof { display: grid; gap: 10px; border-top: 1px solid var(--line, #d9d9d9); padding-top: 18px; }
.llm-inferred-method-run-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.llm-inferred-method-run-heading h4 { margin: 0; font-size: 18px; font-weight: 620; }
#llm-inferred-method-run-output { font-size: 17px; font-variant-numeric: tabular-nums; }
#llm-inferred-method-run-details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 10px 0 0; font-size: 10px; }
#llm-inferred-method-run-details dt { color: var(--ink-muted, #6f747b); }
#llm-inferred-method-run-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.llm-inferred-method-model-diff { display: grid; gap: 12px; border-top: 1px solid var(--line, #d9d9d9); padding-top: 20px; }
.llm-inferred-method-model-diff > h4 { margin: 0; font-size: 18px; font-weight: 620; }
#llm-inferred-method-model-diff-primary,
#llm-inferred-method-version-diff-content { display: grid; gap: 14px; }
.llm-inferred-method-model-diff-row { display: grid; gap: 5px; padding: 2px 0; }
.llm-inferred-method-model-diff-row + .llm-inferred-method-model-diff-row { border-top: 1px solid rgba(127, 127, 127, .18); padding-top: 14px; }
.llm-inferred-method-model-diff-row h5 { margin: 0; font-size: 13px; font-weight: 620; }
.llm-inferred-method-model-diff-fact,
.llm-inferred-method-model-diff-kind,
.llm-inferred-method-model-diff-empty,
#llm-inferred-method-model-diff-count { margin: 0; color: var(--ink-muted, #6f747b); font-size: 11px; line-height: 1.5; }
.llm-inferred-method-model-diff-transition { display: grid; justify-items: start; gap: 5px; margin-top: 2px; }
.llm-inferred-method-model-diff-transition code { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink, #202124); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; }
.llm-inferred-method-model-diff-arrow { color: var(--ink-muted, #6f747b); font-size: 12px; line-height: 1; }
#llm-inferred-method-version-diff { border-top: 1px solid rgba(127, 127, 127, .18); padding-top: 10px; }
#llm-inferred-method-version-diff-content { margin-top: 12px; }
#llm-inferred-method-version-diff-content > dl,
#llm-inferred-method-version-diff-identities { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 16px; margin: 2px 0 0; font-size: 10px; }
#llm-inferred-method-version-diff-content dt,
#llm-inferred-method-version-diff-identities dt { color: var(--ink-muted, #6f747b); }
#llm-inferred-method-version-diff-content dd,
#llm-inferred-method-version-diff-identities dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#llm-inferred-method-version-diff-technical { margin-top: 10px; color: var(--ink-muted, #6f747b); }
.llm-inferred-method-learning-record { display: grid; gap: 12px; border-top: 1px solid var(--line, #d9d9d9); padding-top: 20px; }
.llm-inferred-method-learning-record > h4 { margin: 0; font-size: 18px; font-weight: 620; }
.llm-inferred-method-learning-summary { display: grid; gap: 8px; }
.llm-inferred-method-learning-summary p { margin: 0; font-size: 12px; line-height: 1.55; }
.llm-inferred-method-learning-summary .llm-inferred-method-learning-judgment { font-size: 14px; }
.llm-inferred-method-learning-summary > section { display: grid; gap: 3px; }
.llm-inferred-method-learning-summary > section > h5 { margin: 0; color: var(--ink-muted, #6f747b); font-size: 10px; font-weight: 600; }
.llm-inferred-method-learning-summary > section > p { font-size: 13px; }
.llm-inferred-method-learning-summary .llm-inferred-method-model-diff-row h5 { color: var(--ink, #202124); font-size: 12px; }
.llm-inferred-method-learning-summary .llm-inferred-method-continuation { border-top: 1px solid var(--line, #d9d9d9); padding-top: 12px; color: var(--ink-muted, #6f747b); }
#llm-inferred-method-record-content { display: grid; gap: 14px; margin-top: 12px; }
#llm-inferred-method-record-content h5 { margin: 0 0 3px; font-size: 10px; color: var(--ink-muted, #6f747b); }
#llm-inferred-method-record-content p,
#llm-inferred-method-record-content pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; line-height: 1.5; }
#llm-inferred-method-record-content pre { max-height: 220px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#llm-inferred-method-record-technical { margin-top: 14px; border-top: 1px solid rgba(127, 127, 127, .18); padding-top: 10px; }
#llm-inferred-method-record-technical-content { display: grid; gap: 14px; margin-top: 12px; }
#llm-inferred-method-record-technical-content h5 { margin: 0 0 3px; color: var(--ink-muted, #6f747b); font-size: 10px; }
#llm-inferred-method-record-technical-content p,
#llm-inferred-method-record-technical-content pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; line-height: 1.5; }
#llm-inferred-method-record-technical-content pre { max-height: 220px; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.llm-inferred-method-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 0 12px; border-bottom: 1px solid var(--line, #d9d9d9); background: transparent; }
.llm-inferred-method-actions span { flex-basis: 100%; color: var(--ink-muted, #6f747b); font-size: 11px; }
#llm-formula-modal.inferred-method-active .llm-method-actions { width: min(700px, 100%); margin: 0 auto; }
#llm-formula-modal.inferred-method-active #llm-method-status { overflow-wrap: anywhere; color: var(--ink-muted, #6f747b); font-size: 10px; }
@media (max-width: 720px) {
  .method-construction-form { grid-template-columns: minmax(0, 1fr); }
  .method-construction-intro,
  .method-construction-actions { grid-column: 1; }
  .methods-compare-subjects,
  .methods-compare-row > div,
  .llm-inferred-method-delta { grid-template-columns: minmax(0, 1fr); }
  .llm-inferred-method-heading { display: grid; }
  .llm-inferred-method-origin { max-width: none; text-align: left; }
}
@media (max-width: 480px) {
  body:not(.model-home-active) #menubar {
    padding-inline: 8px;
  }
  body:not(.model-home-active) #brand-lockup,
  body:not(.model-home-active) #model-name,
  body:not(.model-home-active) #menubar-right {
    display: none;
  }
  body:not(.model-home-active) #menubar-left,
  body:not(.model-home-active) #workspace-surface-switcher {
    width: 100%;
    min-width: 0;
  }
  body:not(.model-home-active) .workspace-surface-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 6px;
  }
}

/* Analyst Rail ownership: reasoning occupies the upper workspace row; the
   persistent model-state ledger remains the full-width terse status owner. */
body:not(.model-home-active) #side-panel {
  position: relative;
  z-index: 2;
  grid-column: 2;
  grid-row: 1;
}

body:not(.model-home-active) #instrument-title-block-placeholder.engineering-title-block {
  z-index: 1;
  grid-column: 1 / -1;
  grid-row: 2;
}

body:not(.model-home-active) .selector-backed-method-result,
body:not(.model-home-active) .selector-backed-method-refusal,
body:not(.model-home-active) .research-shell-run-consequence {
  position: relative;
  scroll-margin-block: 16px;
}

/* Research Rail viewport boundary: the app shell already reserves the
   persistent bottom bar. Keep every Rail child inside that owned height. */
body:not(.model-home-active) .research-shell-section {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

body:not(.model-home-active) .research-shell {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  overflow: hidden;
}

body:not(.model-home-active) .research-shell-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

body:not(.model-home-active) .research-shell-composer {
  flex: 0 0 auto;
}

body.zone-mode:not(.model-home-active) .iris-selected-forecast-context-line {
  color: rgba(236, 248, 252, 0.72) !important;
}

body.zone-mode:not(.model-home-active) .iris-selected-forecast-method-primary {
  border-top-color: rgba(216, 230, 236, 0.16);
}

body.zone-mode:not(.model-home-active) .iris-selected-forecast-method-primary > strong,
body.zone-mode:not(.model-home-active) .iris-selected-forecast-responsibility-has-method .research-shell-context-kicker,
body.zone-mode:not(.model-home-active) .iris-selected-forecast-responsibility-has-method .iris-method-context-head h3 {
  color: rgba(249, 253, 255, 0.92);
}

body.zone-mode:not(.model-home-active) .iris-selected-forecast-method-primary > p,
body.zone-mode:not(.model-home-active) .iris-selected-forecast-method-summary {
  color: rgba(236, 248, 252, 0.76);
}

body.zone-mode:not(.model-home-active) .iris-selected-forecast-method-standing strong {
  color: rgba(166, 232, 226, 0.94);
}

body.zone-mode:not(.model-home-active) .iris-selected-forecast-method-standing span,
body.zone-mode:not(.model-home-active) .iris-selected-forecast-method-secondary > summary,
body.zone-mode:not(.model-home-active) .research-shell-context-card > summary {
  color: rgba(216, 230, 236, 0.62);
}

body.zone-mode:not(.model-home-active) .iris-selected-forecast-absence,
body.zone-mode:not(.model-home-active) .iris-selected-forecast-absence .research-shell-context-kicker {
  color: rgba(236, 248, 252, 0.74);
}
/* End Research Rail viewport boundary. */

/* Bounded in-grid Model Logic disclosure. */
.workbook-structure-toggle {
  white-space: nowrap;
}

.workbook-structure-toggle.active {
  border-color: rgba(27, 145, 151, 0.44) !important;
  background: rgba(27, 145, 151, 0.1) !important;
  color: #0b7177 !important;
  box-shadow: inset 0 0 0 1px rgba(27, 145, 151, 0.07);
}

.workbook-structure-status-strip[hidden] {
  display: none !important;
}

.workbook-structure-status-strip {
  margin: 10px 0 4px;
  padding: 8px 0 9px;
  border-top: 1px solid rgba(31, 42, 46, 0.1);
  border-bottom: 1px solid rgba(31, 42, 46, 0.1);
}

.workbook-structure-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workbook-structure-status-head strong {
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.025em;
}

.workbook-structure-status-head span {
  padding: 2px 6px;
  border: 1px solid rgba(27, 145, 151, 0.24);
  border-radius: 999px;
  background: rgba(27, 145, 151, 0.08);
  color: #0b7177;
  font-size: 7px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workbook-structure-status-strip > p {
  margin: 7px 0 0;
  color: rgba(70, 89, 95, 0.68);
  font-size: 8px;
  line-height: 1.35;
}

.workbook-structure-rail {
  padding: 4px 0 14px;
}

.workbook-structure-rail h2 {
  margin: 4px 0 2px;
  font-family: var(--mono);
  font-size: 15px;
}

.workbook-structure-rail section {
  margin-top: 12px;
  padding-top: 9px;
  border-top: 1px solid rgba(31, 42, 46, 0.09);
}

.workbook-structure-rail h3 {
  margin: 0 0 6px;
  color: rgba(42, 63, 70, 0.9);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.workbook-structure-cell-label,
.workbook-structure-kind,
.workbook-structure-empty,
.workbook-structure-boundary-note {
  margin: 4px 0;
  color: rgba(70, 89, 95, 0.7);
  font-size: 8px;
  line-height: 1.45;
}

.workbook-structure-kind {
  text-transform: capitalize;
}

.workbook-structure-list {
  margin: 0;
  padding-left: 15px;
  color: rgba(42, 63, 70, 0.84);
  font-size: 8px;
  line-height: 1.55;
}

.workbook-structure-list code,
.workbook-structure-facts code {
  overflow-wrap: anywhere;
  color: #245862;
  font-family: var(--mono);
  font-size: 7.5px;
}

.workbook-structure-list span {
  color: rgba(70, 89, 95, 0.62);
}

.workbook-structure-facts {
  margin: 8px 0 0;
}

.workbook-structure-facts > div {
  display: grid;
  grid-template-columns: minmax(76px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  padding: 3px 0;
}

.workbook-structure-facts dt,
.workbook-structure-facts dd {
  margin: 0;
  font-size: 7.5px;
  line-height: 1.4;
}

.workbook-structure-facts dt {
  color: rgba(70, 89, 95, 0.6);
}

.workbook-structure-facts dd {
  min-width: 0;
  color: rgba(42, 63, 70, 0.84);
  overflow-wrap: anywhere;
}

.workbook-structure-boundary-note {
  margin-top: 14px;
  padding: 8px;
  border: 1px solid rgba(27, 145, 151, 0.14);
  border-radius: 5px;
  background: rgba(27, 145, 151, 0.045);
}

body.zone-mode:not(.model-home-active) .workbook-structure-status-strip,
body.zone-mode:not(.model-home-active) .workbook-structure-rail section {
  border-color: rgba(216, 230, 236, 0.16);
}

body.zone-mode:not(.model-home-active) .workbook-structure-status-head strong,
body.zone-mode:not(.model-home-active) .workbook-structure-rail h2,
body.zone-mode:not(.model-home-active) .workbook-structure-rail h3,
body.zone-mode:not(.model-home-active) .workbook-structure-facts dd,
body.zone-mode:not(.model-home-active) .workbook-structure-list {
  color: rgba(249, 253, 255, 0.92);
}

body.zone-mode:not(.model-home-active) .workbook-structure-status-strip > p,
body.zone-mode:not(.model-home-active) .workbook-structure-cell-label,
body.zone-mode:not(.model-home-active) .workbook-structure-kind,
body.zone-mode:not(.model-home-active) .workbook-structure-empty,
body.zone-mode:not(.model-home-active) .workbook-structure-facts dt,
body.zone-mode:not(.model-home-active) .workbook-structure-list span,
body.zone-mode:not(.model-home-active) .workbook-structure-boundary-note {
  color: rgba(216, 230, 236, 0.76);
}

body.zone-mode:not(.model-home-active) .workbook-structure-list code,
body.zone-mode:not(.model-home-active) .workbook-structure-facts code {
  color: rgba(166, 232, 226, 0.95);
}

body.zone-mode:not(.model-home-active) .workbook-structure-boundary-note {
  border-color: rgba(166, 232, 226, 0.22);
  background: rgba(166, 232, 226, 0.06);
}

.model-logic-toggle {
  white-space: nowrap;
}

.model-logic-toggle.active {
  border-color: rgba(25, 151, 157, 0.42) !important;
  background: rgba(25, 151, 157, 0.09) !important;
  color: #0b7177 !important;
  box-shadow: inset 0 0 0 1px rgba(25, 151, 157, 0.06);
}

.model-logic-status-strip[hidden] {
  display: none !important;
}

.model-logic-status-strip {
  margin: 10px 0 4px;
  padding: 8px 0 9px;
  border-top: 1px solid rgba(31, 42, 46, 0.1);
  border-bottom: 1px solid rgba(31, 42, 46, 0.1);
}

.model-logic-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.model-logic-status-head strong {
  font-size: 10px;
  font-weight: 680;
  letter-spacing: 0.025em;
}

.model-logic-status-head span {
  padding: 2px 6px;
  border: 1px solid rgba(25, 151, 157, 0.22);
  border-radius: 999px;
  background: rgba(25, 151, 157, 0.07);
  color: #0b7177;
  font-size: 7px;
  font-weight: 680;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-logic-status-strip > p {
  margin: 7px 0 0;
  color: rgba(70, 89, 95, 0.64);
  font-size: 8px;
  line-height: 1.35;
}

.model-logic-cell-ref {
  color: rgba(75, 93, 100, 0.7);
  font-family: var(--mono);
  font-size: 7px;
}

.model-logic-related-meaning {
  margin: 4px 0 0;
  color: rgba(45, 65, 72, 0.82);
  font-size: 9px;
  line-height: 1.35;
}

.model-logic-primary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.model-logic-primary-actions button {
  padding: 5px 9px;
  border: 1px solid rgba(31, 74, 82, 0.2);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.76);
  color: #245862;
  font-size: 8px;
  font-weight: 620;
  white-space: nowrap;
}

.model-logic-standing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
}

.model-logic-standing-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
  line-height: 1.35;
}

.model-logic-rail-glyph {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border: 1px solid rgba(119, 146, 156, 0.9);
  border-radius: 1px;
}

[data-logic-layer="working"] .model-logic-rail-glyph {
  border-color: rgba(190, 142, 54, 0.9);
  background: rgba(190, 142, 54, 0.82);
}

[data-logic-layer="admitted"] .model-logic-rail-glyph {
  border-color: rgba(43, 145, 204, 0.9);
  background: rgba(43, 145, 204, 0.9);
}

[data-logic-layer="executable"] .model-logic-rail-glyph {
  border-color: rgba(32, 170, 143, 0.94);
  background: rgba(32, 170, 143, 0.94);
}

.model-logic-bounded-note {
  margin: 7px 0 0;
  padding-top: 6px;
  border-top: 1px solid rgba(31, 42, 46, 0.08);
  color: rgba(75, 93, 100, 0.72);
  font-size: 7.5px;
  line-height: 1.35;
}

.model-memory-disclosure {
  margin-top: 7px;
  padding: 9px 10px 10px;
  border: 1px solid rgba(29, 111, 120, 0.15);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(242, 249, 249, 0.9), rgba(248, 251, 251, 0.7));
}

.model-memory-disclosure-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.model-memory-disclosure-head > span {
  color: rgba(43, 65, 71, 0.74);
  font-size: 7px;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.model-memory-disclosure-head > em {
  color: rgba(23, 109, 118, 0.72);
  font-size: 7px;
  font-style: normal;
  font-weight: 650;
}

.model-memory-meaning {
  margin: 0;
}

.model-memory-meaning-row {
  display: grid;
  grid-template-columns: 47px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-top: 1px solid rgba(31, 42, 46, 0.07);
}

.model-memory-meaning-row dt {
  color: rgba(72, 91, 96, 0.64);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-transform: uppercase;
}

.model-memory-meaning-row dd {
  min-width: 0;
  margin: 0;
}

.model-memory-meaning-row dd strong,
.model-memory-meaning-row dd span {
  display: block;
}

.model-memory-meaning-row dd strong {
  color: #263f45;
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.35;
}

.model-memory-meaning-row dd span {
  margin-top: 2px;
  color: rgba(65, 83, 89, 0.67);
  font-size: 7.5px;
  line-height: 1.4;
}

.model-memory-meaning-row[data-memory-standing="unavailable"] dd strong {
  color: rgba(67, 82, 87, 0.58);
  font-weight: 570;
}

.model-memory-unavailable {
  margin: 0;
  color: rgba(65, 83, 89, 0.68);
  font-size: 8px;
  line-height: 1.45;
}

.timeline-model-memory-disclosure,
.iris-context-disclosure {
  margin-top: 9px;
  border-top: 1px solid rgba(31, 74, 82, 0.12);
}

.timeline-model-memory-disclosure > summary,
.iris-context-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0 2px;
  color: #176d76;
  cursor: pointer;
  font-size: 8.5px;
  font-weight: 680;
  list-style: none;
}

.timeline-model-memory-disclosure > summary::-webkit-details-marker,
.iris-context-disclosure > summary::-webkit-details-marker {
  display: none;
}

.timeline-model-memory-disclosure > summary::after,
.iris-context-disclosure > summary::after {
  content: "▸";
  font-size: 10px;
  line-height: 1;
}

.timeline-model-memory-disclosure[open] > summary::after,
.iris-context-disclosure[open] > summary::after {
  content: "▾";
}

.timeline-model-memory-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.iris-context-disclosure-body {
  margin-top: 7px;
  padding: 9px 10px 10px;
  border: 1px solid rgba(29, 111, 120, 0.15);
  border-radius: 7px;
  background: rgba(242, 249, 249, 0.72);
}

.iris-context-disclosure-body > p {
  margin: 0 0 6px;
  color: rgba(43, 65, 71, 0.76);
  font-size: 8px;
  font-weight: 650;
}

.iris-context-disclosure-body dl {
  margin: 0;
}

.iris-context-category {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid rgba(31, 42, 46, 0.07);
}

.iris-context-category dt {
  color: rgba(72, 91, 96, 0.64);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.iris-context-category dd {
  margin: 0;
}

.iris-context-category dd strong,
.iris-context-category dd span {
  display: block;
  color: #263f45;
  font-size: 8px;
  line-height: 1.4;
}

.iris-context-category dd span {
  margin-top: 2px;
  color: rgba(65, 83, 89, 0.67);
  font-size: 7px;
}

body.zone-mode:not(.model-home-active) .model-logic-toggle.active {
  border-color: rgba(95, 219, 200, 0.4) !important;
  background: rgba(54, 183, 165, 0.12) !important;
  color: rgba(174, 244, 233, 0.94) !important;
}

body.zone-mode:not(.model-home-active) .model-logic-status-strip {
  border-color: rgba(216, 230, 236, 0.12);
}

body.zone-mode:not(.model-home-active) .model-logic-status-head span {
  border-color: rgba(89, 213, 194, 0.25);
  background: rgba(89, 213, 194, 0.1);
  color: rgba(163, 239, 227, 0.94);
}

body.zone-mode:not(.model-home-active) .model-logic-status-strip > p,
body.zone-mode:not(.model-home-active) .model-logic-cell-ref,
body.zone-mode:not(.model-home-active) .model-logic-related-meaning,
body.zone-mode:not(.model-home-active) .model-logic-standing-item,
body.zone-mode:not(.model-home-active) .model-logic-bounded-note {
  color: rgba(222, 235, 238, 0.68);
}

body.zone-mode:not(.model-home-active) .model-logic-standing-summary,
body.zone-mode:not(.model-home-active) .model-logic-bounded-note {
  border-color: rgba(216, 230, 236, 0.12);
}

body.zone-mode:not(.model-home-active) .model-logic-primary-actions button {
  border-color: rgba(199, 224, 229, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(179, 234, 226, 0.92);
}

body.zone-mode:not(.model-home-active) .model-memory-disclosure {
  border-color: rgba(157, 211, 208, 0.14);
  background: rgba(255, 255, 255, 0.035);
}

body.zone-mode:not(.model-home-active) .model-memory-meaning-row {
  border-color: rgba(216, 230, 236, 0.1);
}

body.zone-mode:not(.model-home-active) .model-memory-disclosure-head > span,
body.zone-mode:not(.model-home-active) .model-memory-meaning-row dt,
body.zone-mode:not(.model-home-active) .model-memory-meaning-row dd span,
body.zone-mode:not(.model-home-active) .model-memory-unavailable {
  color: rgba(216, 230, 236, 0.62);
}

body.zone-mode:not(.model-home-active) .model-memory-disclosure-head > em,
body.zone-mode:not(.model-home-active) .model-memory-meaning-row dd strong {
  color: rgba(219, 246, 242, 0.9);
}
/* End bounded in-grid Model Logic disclosure. */

/* PC-UX-001 — quiet, spreadsheet-first Model workspace. */
body:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr) var(--rail-width, clamp(280px, 22vw, 330px));
  grid-template-rows: minmax(0, 1fr);
}

body:not(.model-home-active) #main::before {
  display: none;
}

body:not(.model-home-active) #primary-work-area,
body:not(.model-home-active) #side-panel {
  grid-row: 1;
}

body:not(.model-home-active) #side-panel {
  border-left: 1px solid rgba(49, 79, 115, 0.18);
}

body.zone-mode:not(.model-home-active) #side-panel {
  border-left-color: rgba(216, 230, 236, 0.18);
  box-shadow: none;
}

body:not(.model-home-active) .panel-rail-label,
body:not(.model-home-active) #model-run-state-chip,
body:not(.model-home-active) #health-chip,
body:not(.model-home-active) .iris-method-context-empty,
body:not(.model-home-active) #research-shell-subject-orientation[data-orientation="current"] {
  display: none !important;
}

body:not(.model-home-active) .research-shell-section {
  padding: 18px 18px 16px;
}

body:not(.model-home-active) .research-shell-head {
  min-height: 30px;
  padding-bottom: 10px;
}

body:not(.model-home-active) .research-shell-title {
  font-size: 11px;
  letter-spacing: 0.18em;
}

body:not(.model-home-active) .research-shell-content {
  padding-right: 0;
}

body:not(.model-home-active) .research-shell-composer {
  margin-top: auto;
}

body:not(.model-home-active) .research-shell-prompt-row {
  border-color: rgba(49, 79, 115, 0.24);
  background: rgba(255, 255, 255, 0.18);
}

body.zone-mode:not(.model-home-active) .research-shell-prompt-row {
  border-color: rgba(216, 230, 236, 0.20);
  background: rgba(255, 255, 255, 0.025);
}

body:not(.model-home-active) .model-name {
  appearance: none;
  background: transparent;
  border-top: 0;
  border-bottom: 0;
  cursor: pointer;
  flex: 1 1 320px;
  min-width: 240px;
  max-width: min(390px, 31vw);
  overflow: hidden;
}

body:not(.model-home-active) .model-name-value,
body:not(.model-home-active) .model-name-meta {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.model-home-active) #brand-lockup {
  flex-basis: 164px;
  width: 164px;
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) #dirty-chip {
  margin-top: 0;
  align-self: stretch;
}

body:not(.model-home-active) #menubar-left,
body:not(.model-home-active) #menubar-right {
  min-width: 0;
}

body:not(.model-home-active) #menubar-left {
  flex: 1 1 auto;
  overflow: hidden;
}

body:not(.model-home-active) #menubar-right {
  flex: 0 0 auto;
}

body:not(.model-home-active) #workspace-surface-switcher,
body:not(.model-home-active) #topbar-view-controls,
body:not(.model-home-active) #version-select {
  opacity: 0.55;
}

body:not(.model-home-active) #primary-actions {
  opacity: 1;
}

body:not(.model-home-active) #version-select {
  flex: 0 0 125px;
  min-width: 125px;
  width: 125px;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  flex: 0 0 auto;
  font-weight: 650;
  min-width: 76px;
  width: auto;
}

@media (max-width: 1320px) {
  body:not(.model-home-active) #brand-lockup {
    flex-basis: 148px;
    width: 148px;
    padding-left: 18px;
  }

  body:not(.model-home-active) .model-name {
    flex-basis: 270px;
    min-width: 210px;
    max-width: 29vw;
    padding-right: 14px;
    padding-left: 16px;
  }

  body:not(.model-home-active) .model-name-label {
    display: none;
  }

  body:not(.model-home-active) #main {
    grid-template-columns: minmax(0, 1fr) var(--rail-width, 280px);
  }

  body:not(.model-home-active) .research-shell-section {
    padding-right: 14px;
    padding-left: 14px;
  }
}
/* End PC-UX-001 quiet-workspace authority. */

/* Cut 6 — one analyst entrance and one governed activity surface. */
body.model-home-active #app {
  background: linear-gradient(145deg, #f8f6f1 0%, #f3f0ea 64%, #e8eff1 100%);
  background-size: auto;
}

body.model-home-active .model-home {
  align-items: flex-start;
  padding: clamp(54px, 8vh, 92px) clamp(28px, 6vw, 88px);
}

body.model-home-active .model-home::before,
body.model-home-active .model-home::after {
  display: none;
}

body.model-home-active .model-home-layout {
  width: min(1080px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: clamp(32px, 6vw, 72px);
}

body.model-home-active .model-home-shell {
  height: auto;
  min-height: 0;
  gap: 20px;
}

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

body.model-home-active .model-home h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.08em;
}

body.model-home-active .model-home-helper {
  max-width: none;
  margin-top: 6px;
  letter-spacing: 0.04em;
}

.search-help {
  position: fixed;
  top: max(30px, calc(env(safe-area-inset-top) + 22px));
  right: max(94px, calc(env(safe-area-inset-right) + 94px));
  z-index: 10;
}

body:not(.model-home-active) .search-help,
body.login-active .search-help {
  display: none;
}

.search-help-toggle {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(49, 79, 115, 0.42);
  border-radius: 50%;
  background: rgba(248, 246, 241, 0.62);
  color: rgba(49, 79, 115, 0.82);
  font: 600 12px/1 var(--mono);
  cursor: pointer;
}

.search-help-toggle:hover,
.search-help-toggle:focus-visible {
  border-color: rgba(49, 79, 115, 0.72);
  background: rgba(255, 255, 255, 0.86);
}

.search-help-toggle:focus-visible {
  outline: 2px solid rgba(49, 79, 115, 0.38);
  outline-offset: 3px;
}

.search-help-popover {
  position: absolute;
  top: 32px;
  right: 0;
  left: auto;
  width: min(300px, calc(100vw - 56px));
  padding: 14px 16px;
  border: 1px solid rgba(49, 79, 115, 0.28);
  border-radius: 4px;
  background: rgba(248, 246, 241, 0.98);
  box-shadow: 0 10px 26px rgba(49, 79, 115, 0.14);
  color: rgba(31, 42, 46, 0.82);
}

.search-help-popover h2 {
  margin: 0 0 10px;
  color: rgba(49, 79, 115, 0.88);
  font: 650 12px/1.3 var(--font);
}

.search-help-popover p {
  margin: 0 0 8px;
  font: 520 11px/1.5 var(--font);
}

.search-help-popover p:last-child {
  margin-bottom: 0;
}

.model-memory-surface {
  display: grid;
  gap: 22px;
  min-width: 0;
  margin-bottom: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.18);
}

.model-memory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.model-memory-heading span,
.model-memory-density-header,
.model-memory-density-label {
  color: rgba(49, 79, 115, 0.62);
  font: 720 9px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-memory-heading strong {
  color: rgba(31, 42, 46, 0.92);
  font: 680 20px/1.2 var(--font);
}

.model-memory-density {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid rgba(49, 79, 115, 0.12);
  border-bottom: 1px solid rgba(49, 79, 115, 0.12);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.model-memory-density-header,
.model-memory-density-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  min-width: max-content;
}

.model-memory-density-header {
  grid-template-columns: 72px auto auto;
  justify-content: start;
  color: rgba(49, 65, 72, 0.54);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.model-memory-density-header span:last-child {
  margin-left: auto;
}

.model-memory-density-cells {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 14px;
  gap: 4px;
  align-items: center;
}

.model-memory-density-cell {
  display: block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(49, 79, 115, 0.08);
  border-radius: 2px;
  background: rgba(49, 79, 115, 0.06);
}

.model-memory-density-cell.density-one { background: rgba(49, 79, 115, 0.28); }
.model-memory-density-cell.density-some { background: rgba(49, 79, 115, 0.52); }
.model-memory-density-cell.density-many { background: rgba(49, 79, 115, 0.82); }

.model-memory-events {
  display: grid;
  gap: 24px;
}

.model-memory-day {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(49, 79, 115, 0.12);
}

.model-memory-day h3 {
  margin: 0;
  color: rgba(49, 65, 72, 0.62);
  font: 620 11px/1.3 var(--mono);
}

.model-memory-day > div {
  display: grid;
  gap: 8px;
}

.model-memory-event {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}

.model-memory-event-main {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 16px;
  min-width: 0;
}

.model-memory-event-action {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(31, 42, 46, 0.90);
  text-align: left;
  cursor: pointer;
}

.model-memory-event-action:hover strong,
.model-memory-event-action:focus-visible strong {
  color: var(--accent-dark);
  text-decoration: underline;
}

.model-memory-event strong {
  font: 650 13px/1.35 var(--font);
}

.model-memory-event-copy {
  display: grid;
  gap: 3px;
}

.model-memory-event-copy span {
  color: rgba(49, 65, 72, 0.68);
  font: 520 11px/1.4 var(--font);
}

.model-memory-event time {
  flex: 0 0 auto;
  color: rgba(49, 65, 72, 0.58);
  font: 520 10px/1.3 var(--mono);
}

.model-memory-compare-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.76);
  font: 600 10px/1.3 var(--font);
  cursor: pointer;
}

.model-memory-compare-action:hover,
.model-memory-compare-action:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}

.model-memory-compare-action:disabled {
  color: rgba(49, 65, 72, 0.35);
  cursor: not-allowed;
  text-decoration: none;
}

.model-memory-event-author,
.model-memory-event-meta {
  flex: 1 1 100%;
  color: rgba(49, 65, 72, 0.60);
  font: 520 11px/1.4 var(--font);
}

.model-memory-run-compare {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(49, 65, 72, 0.12);
}

.model-memory-run-compare-heading {
  margin: 0 0 8px;
  font: 650 12px/1.3 var(--font);
  color: rgba(31, 42, 46, 0.90);
}

.model-memory-run-compare-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.model-memory-run-compare-row select {
  min-width: 0;
  max-width: 260px;
  font: 520 11px/1.3 var(--font);
}

.model-memory-empty,
.model-memory-unavailable {
  margin: 0;
  color: rgba(49, 65, 72, 0.60);
  font: 520 11px/1.4 var(--font);
}

.model-history {
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding-top: 16px;
}

.model-history-heading {
  color: rgba(49, 79, 115, 0.72);
  font: 720 10px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.model-history-current,
.model-history-option-meta {
  color: rgba(49, 65, 72, 0.60);
  font: 520 10px/1.35 var(--mono);
}

.model-history-list {
  display: grid;
  gap: 4px;
  max-width: 720px;
}

.model-history-option {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  cursor: pointer;
}

.model-history-option:hover,
.model-history-option:focus-visible,
.model-history-option.is-selected {
  border-left-color: rgba(49, 79, 115, 0.60);
  background: rgba(49, 79, 115, 0.06);
}

.model-history-option-main {
  display: grid;
  gap: 3px;
}

.model-history-option-actions {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 12px;
}

.model-history-option-label {
  color: rgba(31, 42, 46, 0.84);
  font: 620 11px/1.3 var(--font);
}

body.zone-mode:not(.model-home-active) .rail-responsibility-context-disclosure,
body.zone-mode:not(.model-home-active) .rail-responsibility-context-disclosure {
  border-color: rgba(216, 230, 236, 0.14);
}

body.zone-mode:not(.model-home-active) .rail-responsibility-context-disclosure > summary {
  color: rgba(216, 230, 236, 0.72);
}

@media (max-width: 760px) {
  body.model-home-active .model-home-layout,
  .model-memory-day {
    grid-template-columns: minmax(0, 1fr);
  }

  .model-memory-day h3 {
    margin-bottom: -8px;
  }
}

/* The selected Method remains a Rail read surface until the analyst invokes
   its existing edit action. Authoring temporarily widens that same margin;
   it does not create a second Method surface or cover the spreadsheet. */
body.analytical-view-authoring-active:not(.model-home-active) #main {
  grid-template-columns: minmax(0, 1fr) clamp(420px, 32%, 600px);
}

body.analytical-view-authoring-active:not(.model-home-active) .research-shell-section {
  padding-right: clamp(20px, 2.2vw, 32px);
  padding-left: clamp(20px, 2.2vw, 32px);
}

body.analytical-view-authoring-active:not(.model-home-active) .rail-responsibility-authoring {
  border-top: 0;
  margin-top: 2px;
  padding-top: 0;
}

body.analytical-view-authoring-active:not(.model-home-active) .rail-responsibility-authoring > h3 {
  color: rgba(31, 48, 70, 0.78);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

body.analytical-view-authoring-active:not(.model-home-active) .analytical-view-method-editor {
  font-size: 12px;
  line-height: 1.65;
  min-height: clamp(340px, 46vh, 520px);
  padding: 15px 16px;
}

body.zone-mode.analytical-view-authoring-active:not(.model-home-active) .rail-responsibility-authoring > h3 {
  color: rgba(216, 230, 236, 0.84);
}

/* How this model works — the model explained before its individual Methods. */
.rail-model-explanation-block { margin: 0 0 14px; }
.rail-model-explanation > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg);
  padding: 2px 0;
}
.rail-model-explanation-body { padding: 6px 0 2px; }
.rail-model-explanation-body p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg);
}
.rail-model-explanation-body p:last-child { margin-bottom: 0; }
.rail-model-explanation-pending { color: var(--fg-dim); }
.rail-model-explanation-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  line-height: inherit;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.rail-model-explanation-link:hover { text-decoration-thickness: 2px; }
.rail-judgments-heading {
  margin: 0 0 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* Search shares the workspace product identity. Keep the menubar out of the
   search layout, but expose only its existing brand lockup as the shell
   anchor; workspace controls remain unavailable on this surface. */
body.model-home-active #menubar {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 4;
  height: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}

body.model-home-active #menubar-left {
  display: block;
  position: static;
}

body.model-home-active #menubar-left > :not(#brand-lockup),
body.model-home-active #menubar-right {
  display: none !important;
}

body:not(.model-home-active) #brand-lockup,
body.model-home-active #brand-lockup {
  align-items: flex-start;
  display: flex;
  flex: 0 0 164px;
  flex-direction: column;
  justify-content: center;
  width: 164px;
  margin: 0;
  padding: 4px 34px 0 24px;
  text-align: left;
}

body.model-home-active #brand-lockup {
  height: 48.2px;
  position: absolute;
  left: 37px;
  top: 22px;
  pointer-events: auto;
}

body:not(.model-home-active) #logo,
body.model-home-active #logo {
  color: rgba(31, 48, 70, 0.94);
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.42em;
  line-height: 0.9;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity,
body.model-home-active #runtime-identity {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  margin-top: -2px;
  max-width: none;
  color: rgba(49, 79, 115, 0.42);
  font: 500 6px/1 var(--mono);
  letter-spacing: 0.16em;
  text-align: left;
}

body:not(.model-home-active) #runtime-identity .runtime-maker,
body.model-home-active #runtime-identity .runtime-maker {
  color: rgba(49, 79, 115, 0.54);
  display: block;
  font: 540 9px/1 var(--mono);
  letter-spacing: 0.15em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Keep the model attribution clear of the identity rail divider. */
body:not(.model-home-active) #brand-lockup {
  flex-basis: 172px;
  width: 172px;
  padding-right: 42px;
}

/* Model-level navigation is a deliberate control cluster, not status chrome. */
body:not(.model-home-active) #workspace-surface-switcher {
  display: inline-flex !important;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn {
  height: 30px;
  padding: 0 4px;
  color: rgba(31, 48, 70, 0.78);
  font: 650 11px/1 var(--font);
  letter-spacing: 0;
}

body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn:hover,
body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn:focus-visible,
body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn.active,
body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn[aria-pressed="true"] {
  color: var(--accent-dark);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

body:not(.model-home-active) #version-select {
  display: inline-flex !important;
  min-width: 156px;
  max-width: 220px;
  flex: 0 1 196px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(49, 79, 115, 0.34);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(31, 48, 70, 0.90);
  font: 650 11px/1 var(--font);
  cursor: pointer;
}

body:not(.model-home-active) #version-select:hover,
body:not(.model-home-active) #version-select:focus-visible {
  border-color: rgba(49, 79, 115, 0.72);
  outline: 2px solid rgba(49, 79, 115, 0.12);
  outline-offset: 1px;
}

body[data-workspace-surface="timeline"] #version-select,
body[data-workspace-surface="timeline"] #primary-actions {
  display: inline-flex !important;
}

body[data-workspace-surface="timeline"] #primary-actions {
  margin-left: 0;
}

/* Bounded top-rail hierarchy: identity, primary navigation, model state, and
   the one lawful action. Existing controls and authority remain unchanged. */
body:not(.model-home-active) #menubar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  grid-template-rows: 38px 28px;
  align-items: stretch;
  column-gap: 24px;
  height: 72px;
  min-height: 72px;
  padding: 0 20px;
}

body:not(.model-home-active) #menubar-left {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: stretch;
  gap: 14px;
}

body:not(.model-home-active) #menubar-right {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  grid-template-rows: 38px 28px;
  align-items: center;
  gap: 0;
  margin-left: 0;
}

body:not(.model-home-active) #topbar-primary-row,
body:not(.model-home-active) #topbar-navigation-row {
  display: flex;
  align-items: center;
  min-width: 0;
}

body:not(.model-home-active) #topbar-primary-row {
  justify-content: flex-end;
  gap: 14px;
}

body:not(.model-home-active) #topbar-navigation-row {
  justify-content: flex-end;
  gap: 18px;
}

body:not(.model-home-active) .model-name {
  flex: 0 1 min(460px, 44vw);
  min-width: 220px;
  max-width: min(460px, 44vw);
  padding: 0;
}

body:not(.model-home-active) .model-name-label {
  color: rgba(49, 79, 115, 0.54);
  font: 650 9px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body:not(.model-home-active) .model-name-value {
  color: rgba(31, 46, 61, 0.96);
  font-size: 17px;
  font-weight: 620;
}

body:not(.model-home-active) .model-state-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(49, 79, 115, 0.56);
  font: 650 9px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

body:not(.model-home-active) #version-select {
  width: 188px;
  min-width: 188px;
  max-width: 188px;
  height: 29px;
  flex: 0 0 188px;
  opacity: 1;
  padding: 0 10px;
  border: 1px solid rgba(49, 79, 115, 0.34);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.80);
  color: rgba(31, 48, 70, 0.92);
  font: 620 10px/1 var(--font);
}

body:not(.model-home-active) #primary-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 0;
  opacity: 1;
}

body:not(.model-home-active) #model-workflow-next-action-button {
  min-width: 104px;
  height: 30px;
  border: 1px solid rgba(49, 79, 115, 0.58);
  border-radius: 4px;
  background: rgba(49, 79, 115, 0.12);
  color: rgba(31, 46, 61, 0.96);
  font-size: 11px;
  font-weight: 720;
}

body:not(.model-home-active) .topbar-contextual-action {
  height: 28px;
  padding: 0 8px;
  border-color: rgba(49, 79, 115, 0.28);
  background: transparent;
  color: rgba(49, 79, 115, 0.82);
  font-size: 10px;
}

body:not(.model-home-active) #workspace-surface-switcher {
  display: flex !important;
  align-items: center;
  gap: 20px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
}

body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn {
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.78);
  font: 650 10px/1 var(--font);
  cursor: pointer;
}

body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn:hover,
body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn:focus-visible,
body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn.active,
body:not(.model-home-active) #workspace-surface-switcher .workspace-surface-btn[aria-pressed="true"] {
  color: var(--accent-dark);
  background: transparent;
  box-shadow: inset 0 -1px 0 currentColor;
  outline: none;
}

body:not(.model-home-active) #topbar-view-controls {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 8px;
  margin: 0;
  min-width: max-content;
}

body:not(.model-home-active) #topbar-view-controls .topbar-action {
  min-height: 24px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(49, 79, 115, 0.48);
  font-size: 9px;
}

body:not(.model-home-active) #topbar-view-controls .topbar-action:hover:not(:disabled),
body:not(.model-home-active) #topbar-view-controls .topbar-action:focus-visible {
  color: rgba(49, 79, 115, 0.84);
  background: transparent;
  border-color: transparent;
}

body:not(.model-home-active) #dirty-chip,
body:not(.model-home-active) #model-run-state-chip,
body:not(.model-home-active) #health-chip,
body:not(.model-home-active) #snap-chip {
  display: none !important;
}

@media (max-width: 900px) {
  body:not(.model-home-active) #menubar {
    grid-template-columns: 1fr;
    grid-template-rows: 38px 38px;
    height: 76px;
    min-height: 76px;
    row-gap: 0;
  }

  body:not(.model-home-active) #menubar-left,
  body:not(.model-home-active) #menubar-right {
    grid-column: 1;
    grid-row: auto;
  }

  body:not(.model-home-active) #menubar-left {
    min-height: 38px;
  }

  body:not(.model-home-active) #menubar-right {
    grid-template-rows: 38px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
  }

  body:not(.model-home-active) #topbar-navigation-row {
    display: none;
  }
}
.rail-method-enrichment-status {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-left: 3px solid var(--iris-accent, #7b8794);
  background: rgba(125, 135, 145, 0.08);
}

.rail-method-enrichment-status p {
  margin: 0.25rem 0 0;
}

.rail-method-enrichment-status-generating {
  color: var(--iris-muted, #68737d);
}

.rail-method-enrichment-status-no_supported_method {
  color: var(--iris-muted, #68737d);
}

.rail-method-enrichment-status-needs_attention {
  color: var(--iris-warning, #8a5a00);
}

/* Living Method: approved external observations behind the Method's data requirements */
.llm-method-data-requirements { display: grid; gap: 7px; padding: 12px; margin-bottom: 12px; border-left: 2px solid rgba(64, 111, 128, .35); background: rgba(64, 111, 128, .05); }
.llm-method-data-requirements[hidden] { display: none; }
.llm-method-data-requirements h4 { margin: 0; font-size: 13px; }
.llm-method-data-requirements-list { display: grid; gap: 9px; }
.llm-method-data-requirements-list article { display: grid; gap: 4px; padding-top: 8px; border-top: 1px solid rgba(64, 111, 128, .16); }
.llm-method-data-requirements-list article:first-child { padding-top: 0; border-top: 0; }
.llm-method-data-requirements-list p { margin: 0; color: var(--ink-muted, #6f747b); font-size: 12px; line-height: 1.45; }
.llm-method-data-requirements-list .llm-method-data-requirement-name { font-size: 13px; font-weight: 600; }
.llm-method-data-requirements-list .llm-method-data-requirement-standing { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 12px; }
.llm-method-data-requirements-list .llm-method-data-requirement-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.llm-method-data-requirements-list .llm-method-data-requirement-candidates { display: flex; flex-wrap: wrap; gap: 6px; }
.llm-method-data-requirements-list .llm-method-external-state-representation { padding: 1px 6px; border-radius: 3px; font-size: 10px; font-weight: 650; letter-spacing: .08em; border: 1px solid rgba(64, 111, 128, .35); }
.llm-method-data-requirements-list .llm-method-external-state-representation[data-representation="PROXY"] { border-color: rgba(176, 108, 20, .6); color: #8a5410; }
#llm-method-data-requirements-status { font-size: 12px; color: var(--ink-muted, #6f747b); }
.run-diff-observation { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid rgba(64, 111, 128, .16); }
.run-diff-observation:first-child { border-top: 0; padding-top: 0; }
.run-diff-observation-key { font-weight: 600; }
.run-diff-observation-line { font-size: 12px; }
.run-diff-observation details summary { cursor: pointer; font-size: 11px; color: var(--ink-muted, #6f747b); }


/* ── System workbooks (Market Monitor is the first) ── */
.model-home-workspace {
  margin: 0 0 14px;
  border: 1px solid rgba(49, 79, 115, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.42);
}

.model-home-workspace-title {
  padding: 8px 16px 6px;
  font: 600 10px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  border-bottom: 1px solid rgba(49, 79, 115, 0.16);
}

.model-home-result-system-workbook:last-child {
  border-bottom: 0;
}

.system-workbook-details {
  flex: 0 0 auto;
  max-height: 34vh;
  overflow: auto;
  padding: 8px 14px;
  border-top: 1px solid rgba(49, 79, 115, 0.16);
  background: rgba(255, 255, 255, 0.52);
  font: 12px/1.45 var(--font);
  color: var(--fg);
}

.system-workbook-details-empty,
.system-workbook-details-copy {
  color: rgba(49, 79, 115, 0.85);
}

.system-workbook-details-current {
  margin-left: 8px;
  font-weight: 600;
}

.system-workbook-details-carrier {
  margin-left: 8px;
  color: rgba(49, 79, 115, 0.85);
}

.system-workbook-details-more {
  margin-top: 6px;
}

.system-workbook-details-more summary {
  cursor: pointer;
  font: 600 10px/1.6 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.system-workbook-detail {
  display: flex;
  gap: 12px;
}

.system-workbook-detail-label {
  flex: 0 0 160px;
  font: 600 10px/1.8 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(49, 79, 115, 0.85);
}

.system-workbook-detail-value,
.system-workbook-detail-minor {
  font: 12px/1.8 var(--mono);
  word-break: break-all;
}

.system-workbook-detail-group {
  margin-top: 6px;
}

.system-workbook-receipt {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(49, 79, 115, 0.24);
}

.system-workbook-context-editor {
  position: absolute;
  z-index: 11;
  min-width: 240px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid #8a5a00;
  background: #fff8e6;
  font: 12px/18px var(--font);
}


/* Responsibility preparation standing (backend-owned; one cue per row).
   Color = standing relative to the current model; text = what comes next. */
.rail-preparation-work-waiting {
  font-weight: 600;
}

.rail-model-presence {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
  background: #9aa4ad;
}

.rail-responsibility-list [data-model-presence="in_model"] .rail-model-presence {
  background: #2e8b57;
}

.rail-responsibility-list [data-model-presence="actionable_not_in_model"] .rail-model-presence {
  background: #d9a400;
}

.rail-responsibility-list [data-model-presence="needs_attention"] .rail-model-presence {
  background: #c8372d;
}

.rail-responsibility-list [data-model-presence="neutral"] .rail-model-presence {
  background: #9aa4ad;
}
/* Exact PM Method inspection reuses the workbook/Rail, without authoring or
   ordinary Model-open controls. Standing is supplied by Core, not CSS/JS. */
body.method-inspection-active #topbar-primary-row,
body.method-inspection-active #topbar-navigation-row,
body.method-inspection-active #dirty-chip,
body.method-inspection-active #model-run-state-chip,
body.method-inspection-active #health-chip,
body.method-inspection-active #btn-entry-surface,
body.method-inspection-active .rail-focus-breadcrumb,
body.method-inspection-active #toolbar { display: none !important; }
.method-inspection pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Import Report: a research note inside Model Memory. Typography, whitespace,
   rules, indentation and links carry the hierarchy. No cards, tiles, tabs,
   widgets, sidebars or charts. */
.import-report {
  color: var(--fg);
  font: 14px/1.6 var(--font);
  margin: 0 auto;
  max-width: 68ch;
  padding: 8px 0 48px;
}
.import-report-head { border-bottom: 1px solid var(--border); margin-bottom: 28px; padding-bottom: 18px; }
.import-report-kicker { color: var(--fg-dim); font-size: 11px; letter-spacing: 0.14em; margin: 0 0 6px; text-transform: uppercase; }
.import-report h1 { font-size: 26px; font-weight: 640; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 8px; }
.import-report h2 { border-top: 1px solid var(--border); font-size: 15px; font-weight: 640; margin: 30px 0 10px; padding-top: 16px; }
.import-report-head + section > h2 { border-top: 0; margin-top: 0; padding-top: 0; }
.import-report section > p, .import-report footer > p { margin: 0 0 10px; }
.import-report-dim { color: var(--fg-dim); }
.import-report-later { margin: 4px 0 0; font-size: 13px; color: var(--fg); }
.import-report-absence { color: var(--fg-dim); font-style: italic; }
.import-report-basis { color: var(--fg-dim); font-size: 13px; margin: 0 0 10px; }
.import-report ul, .import-report ol { list-style: none; margin: 0; padding: 0; }
.import-report-methods > li, .import-report-relations > li, .import-report-findings > li { margin: 0 0 8px; padding-left: 18px; text-indent: -18px; }
.import-report-oneline { color: var(--fg-dim); display: block; padding-left: 18px; text-indent: 0; }
.import-report-subject {
  background: transparent; border: 0; color: var(--fg); cursor: pointer;
  font: inherit; padding: 0; text-align: left; text-decoration: underline;
  text-decoration-color: rgba(49, 79, 115, 0.35); text-underline-offset: 3px;
}
.import-report-subject:hover, .import-report-subject:focus-visible { color: var(--accent-dark, #314f73); text-decoration-color: currentColor; outline: none; }
.import-report-findings .import-report-subject { text-decoration: none; }
.import-report-findings .import-report-subject:hover { text-decoration: underline; }
.import-report-connected > li { display: flex; gap: 8px; margin: 0 0 4px; }
.import-report-rank { color: var(--fg-dim); flex: 0 0 2.4ch; text-align: right; }
.import-report-count { color: var(--fg-dim); font-variant-numeric: tabular-nums; margin-left: auto; padding-left: 12px; }
.import-report-more > summary { color: var(--fg-dim); cursor: pointer; font-size: 13px; margin: 6px 0 10px 3.4ch; }
.import-report-external { font-weight: 560; }
.import-report-arrow { color: var(--fg-dim); }
.import-report-relations .import-report-dim { display: block; font-size: 13px; padding-left: 18px; text-indent: 0; }
.import-report-subjects { color: var(--fg-dim); display: block; font-size: 13px; padding-left: 18px; text-indent: 0; }
.import-report footer h2 { font-size: 13px; }
.import-report-comparison h2 { border-top: 1px solid var(--border); margin-top: 30px; padding-top: 16px; }
.import-report-comparison [data-comparison-standing] { color: var(--fg-dim); }
.import-report-comparison [data-comparison-methods] .import-report-dim { display: block; font-size: 13px; padding-left: 18px; text-indent: 0; }
.import-report-record { font-size: 13px; }

.import-report-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px clamp(20px, 4vw, 48px) 8px;
}
.import-report-loading { color: var(--fg-dim); margin: 0; }
.import-report-return { margin: 0 auto 4px; max-width: 68ch; }
.import-report-return button {
  background: transparent; border: 0; color: var(--fg-dim); cursor: pointer;
  font: 12px/1.4 var(--font); padding: 0;
}
.import-report-return button::before { content: "\2190\00a0"; }
.import-report-return button:hover { color: var(--accent-dark); }
.model-memory-import-report-action {
  background: transparent; border: 0; color: var(--accent-dark); cursor: pointer;
  font: inherit; font-size: 12px; padding: 0; text-decoration: underline; text-underline-offset: 3px;
}
/* Reading and reacting side by side: the Rail returns while the report is open.
   The timeline surface hides the panel with !important; this is the one
   sanctioned exception, scoped to the open report. */
body.timeline-focus-active.import-report-open #main,
body[data-workspace-surface="timeline"].import-report-open #main {
  grid-template-columns: minmax(0, 1fr) clamp(300px, 25vw, 400px) !important;
}
body.timeline-focus-active.import-report-open #side-panel,
body[data-workspace-surface="timeline"].import-report-open #side-panel {
  display: flex !important;
}

/* External dependencies: the edges from this Model's governed Methods to
   shared Market State.  A read projection rendered verbatim; no value is
   fetched or derived here. */
.model-external-dependencies {
  margin-top: 10px;
  padding: 8px 0 10px;
  border-top: 1px solid rgba(31,42,46,0.08);
}

.model-external-dependencies[hidden],
body.import-report-open .model-external-dependencies {
  display: none !important;
}

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

.model-external-dependencies-empty,
.model-external-dependencies-standing {
  color: rgba(49, 65, 72, 0.62);
  font: 520 11px/1.45 var(--font);
  margin: 0;
}

.model-external-dependency {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(31,42,46,0.06);
  font: 500 11px/1.4 var(--font);
  color: #17262B;
}

.model-external-dependency-state {
  font-weight: 640;
}

.model-external-dependency-key,
.model-external-dependency-method {
  color: rgba(49, 65, 72, 0.7);
  font-size: 10.2px;
  font-variant-numeric: tabular-nums;
}

.model-external-dependency-status-ambiguous {
  color: var(--dirty);
}

/* Rail collapsible titles share one type. "How this model works" is the
   reference; Notes, IRIS Context, All N forecast responsibilities, Worth a
   look and the Forecast responsibilities heading follow it. Layout (markers,
   flex rows, margins) stays with each section; only the type is unified. */
.rail-model-explanation > summary,
.rail-all-judgments > summary,
.rail-worth-a-look > summary,
.rail-note-list > summary,
.iris-context-disclosure > summary,
h3.rail-judgments-heading {
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--fg);
}
body.zone-mode:not(.model-home-active) .rail-model-explanation > summary,
body.zone-mode:not(.model-home-active) .rail-all-judgments > summary,
body.zone-mode:not(.model-home-active) .rail-worth-a-look > summary,
body.zone-mode:not(.model-home-active) .rail-note-list > summary,
body.zone-mode:not(.model-home-active) .iris-context-disclosure > summary,
body.zone-mode:not(.model-home-active) h3.rail-judgments-heading {
  color: var(--fg);
}

/* Conversation zone: the latest answer, its IRIS Context and Save as Note sit
   last in the research body, directly above the composer. Answer structure
   (paragraphs, lists, bold, inline code) stays compact at Rail width. */
[data-rail-conversation]:empty { display: none; }
.research-shell-model-answer p { margin: 0 0 6px; }
.research-shell-model-answer p:last-child { margin-bottom: 0; }
.research-shell-model-answer ul,
.research-shell-model-answer ol { margin: 0 0 6px; padding-left: 18px; }
.research-shell-model-answer li { margin: 0 0 4px; }
.research-shell-model-answer li:last-child { margin-bottom: 0; }
.research-shell-model-answer code { font-size: 0.95em; }
/* A pipe table scrolls inside its own wrapper, so a wide table never widens
   the Rail, the workbook or the page. */
.research-shell-model-answer .iris-answer-table-scroll {
  /* The Rail body is a grid item sized by its content; inline-size
     containment keeps the table's width out of that sizing. */
  contain: inline-size;
  margin: 0 0 8px;
  max-width: 100%;
  overflow-x: auto;
}
.research-shell-model-answer .iris-answer-table-scroll:last-child { margin-bottom: 0; }
.iris-answer-table {
  border-collapse: collapse;
  font-size: 0.92em;
  line-height: 1.35;
  min-width: 100%;
}
.iris-answer-table th,
.iris-answer-table td {
  border-bottom: 1px solid rgba(127, 127, 127, 0.24);
  padding: 4px 8px 4px 0;
  text-align: left;
  vertical-align: top;
}
.iris-answer-table th { font-weight: 600; white-space: nowrap; }
.iris-answer-table tbody tr:last-child td { border-bottom: 0; }
.iris-answer-table [data-align="right"] { text-align: right; }
.iris-answer-table [data-align="center"] { text-align: center; }

/* Review draft / Resolve questions (rail-method-resolution.js). Quiet, in the
   Rail's own treatments; one question at a time. */
.method-resolution {
  --mr-text: rgba(24, 35, 39, 0.82);
  --mr-muted: rgba(24, 35, 39, 0.6);
  --mr-rule: rgba(24, 35, 39, 0.12);
  --mr-accent: #326b64;
  --mr-warn: #b98a2f;
  --mr-warn-text: #8a6416;
  --mr-field: #fff;
  --mr-field-text: rgba(24, 35, 39, 0.92);
}
body.zone-mode:not(.model-home-active) .method-resolution {
  --mr-text: rgba(226, 238, 243, 0.9);
  --mr-muted: rgba(190, 209, 219, 0.72);
  --mr-rule: rgba(216, 230, 236, 0.2);
  --mr-accent: rgba(169, 214, 216, 0.94);
  --mr-warn: rgba(232, 190, 110, 0.9);
  --mr-warn-text: rgba(240, 206, 140, 0.96);
  --mr-field: rgba(6, 30, 48, 0.72);
  --mr-field-text: rgba(232, 242, 246, 0.96);
}
.method-resolution { color: var(--mr-text); border-top: 1px solid var(--mr-rule); margin-top: 14px; padding-top: 12px; }
.method-resolution:empty { border-top: 0; margin: 0; padding: 0; }
.method-resolution h4 { font: 650 13px/1.35 var(--font); margin: 0 0 6px; }
.method-resolution h5 { font: 650 11px/1.35 var(--font); margin: 10px 0 4px; }
.method-resolution p, .method-resolution li { font-size: 12px; line-height: 1.5; }
.method-resolution ul { margin: 4px 0 8px; padding-left: 16px; }
.method-resolution-context { color: var(--mr-text); margin: 0 0 8px; }
.method-resolution-progress { color: var(--mr-muted); font-size: 10px; letter-spacing: 0.02em; margin: 0 0 6px; text-transform: uppercase; }
.method-resolution-note { color: var(--mr-muted); font-size: 11px; margin: 6px 0; }
.method-resolution-choice { align-items: flex-start; cursor: pointer; display: flex; font-size: 12px; gap: 7px; line-height: 1.4; padding: 4px 0; }
.method-resolution-choice input { margin-top: 2px; }
.method-resolution-recommended { color: var(--mr-accent); font-size: 10px; font-style: normal; font-weight: 650; margin-left: 4px; }
.method-resolution-explain { color: var(--mr-muted); display: block; font-size: 11px; margin: 8px 0; }
.method-resolution-explain textarea { box-sizing: border-box; display: block; font: 12px/1.45 var(--font); margin-top: 3px; padding: 5px 6px; width: 100%; }
.method-resolution-detail { border-top: 1px solid var(--mr-rule); margin: 8px 0; padding-top: 6px; }
.method-resolution-detail summary { color: var(--mr-accent); cursor: pointer; font-size: 11px; font-weight: 650; }
.method-resolution-path, .method-resolution-compare { border-collapse: collapse; font-size: 11px; margin: 4px 0 8px; width: 100%; }
.method-resolution-path th, .method-resolution-path td, .method-resolution-compare th, .method-resolution-compare td { border: 1px solid var(--mr-rule); padding: 3px 5px; text-align: right; vertical-align: top; }
.method-resolution-compare th, .method-resolution-compare td { text-align: left; }
.method-resolution-path th { color: var(--mr-muted); font-weight: 600; white-space: nowrap; }
.method-resolution-path-edit input { box-sizing: border-box; font: 11px/1.3 var(--font); padding: 2px 3px; text-align: right; width: 100%; }
.method-resolution-path-reference td { color: var(--mr-muted); }
.method-resolution-parameters { align-items: end; display: grid; gap: 6px 8px; grid-template-columns: 1fr 1fr; margin: 6px 0 8px; }
.method-resolution-parameters label { color: var(--mr-muted); display: block; font-size: 11px; }
.method-resolution-parameters input, .method-resolution-parameters select { box-sizing: border-box; display: block; font: 12px/1.3 var(--font); margin-top: 2px; padding: 3px 4px; width: 100%; }
.method-resolution-parameters button { background: transparent; border: 1px solid var(--mr-accent); border-radius: 4px; color: var(--mr-accent); cursor: pointer; font: 650 11px/1.3 var(--font); padding: 5px 8px; }
.method-resolution-proposal { border-left: 2px solid var(--mr-warn); margin: 0 0 8px; padding: 2px 0 2px 9px; }
.method-resolution-proposal p { margin: 2px 0; }
.method-resolution-proposal button { background: transparent; border: 0; color: var(--mr-accent); cursor: pointer; font: 650 11px/1.3 var(--font); padding: 0; }
.method-resolution-evidence, .method-resolution-open { border-left: 2px solid var(--mr-warn); margin: 8px 0; padding: 2px 0 2px 9px; }
.method-resolution-evidence h4, .method-resolution-open h5 { color: var(--mr-warn-text); font-size: 11px; margin: 0 0 2px; }
.method-resolution-diff-pair { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.method-resolution-diff-pair small { color: var(--mr-muted); font-size: 10px; text-transform: uppercase; }
.method-resolution-diff-pair pre { font: 11px/1.45 var(--font); margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.method-resolution-answers { list-style: none; padding-left: 0; }
.method-resolution-answers small { color: var(--mr-muted); display: block; font-size: 10px; text-transform: uppercase; }
.rail-responsibility .method-resolution .analytical-view-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; }
.method-resolution h4, .method-resolution h5, .method-resolution strong { color: inherit; }
.method-resolution textarea, .method-resolution input[type="text"], .method-resolution select {
  background: var(--mr-field); border: 1px solid var(--mr-rule); border-radius: 3px; color: var(--mr-field-text);
}
.method-resolution-choice { color: var(--mr-text); }

/* Connected apps (D1 OAuth hardening): the Workspace's delegations, beside Logout. */
.session-connected-apps {
  right: max(96px, calc(env(safe-area-inset-right) + 86px));
}

.connected-apps-panel {
  position: fixed;
  top: max(58px, calc(env(safe-area-inset-top) + 50px));
  right: max(32px, calc(env(safe-area-inset-right) + 22px));
  z-index: 100;
  width: min(420px, calc(100vw - 32px));
  padding: 14px 16px;
  border: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 6px;
  background: rgba(248, 246, 241, 0.98);
  box-shadow: 0 8px 28px rgba(26, 42, 61, 0.18);
  font: 400 12px/1.45 var(--font);
  color: var(--ink, #1a2a3d);
}

.connected-apps-panel[hidden] {
  display: none;
}

.connected-apps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.connected-apps-head h2 {
  margin: 0;
  font: 600 13px/1.3 var(--font);
}

.connected-apps-close {
  border: 0;
  background: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: rgba(49, 79, 115, 0.7);
}

.connected-apps-note,
.connected-apps-status {
  margin: 8px 0 0;
  color: rgba(26, 42, 61, 0.78);
}

.connected-apps-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.connected-app {
  padding: 8px 0;
  border-top: 1px solid rgba(49, 79, 115, 0.14);
}

.connected-app-scopes {
  margin-left: 6px;
  font: 500 10px/1.2 var(--font-mono, monospace);
  color: rgba(49, 79, 115, 0.72);
}

.connected-app-meta {
  margin-top: 2px;
  color: rgba(26, 42, 61, 0.66);
}

.connected-app-revoke {
  margin-top: 6px;
  padding: 3px 8px;
  border: 1px solid rgba(160, 48, 48, 0.4);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.7);
  color: rgba(140, 36, 36, 0.92);
  font: 500 11px/1.2 var(--font);
  cursor: pointer;
}

.connected-app-revoke[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* This morning (PH1-F2): the overnight review panel. */
.session-morning-review {
  right: max(206px, calc(env(safe-area-inset-right) + 196px));
}

.morning-review-panel {
  position: fixed;
  top: max(58px, calc(env(safe-area-inset-top) + 50px));
  right: max(32px, calc(env(safe-area-inset-right) + 22px));
  z-index: 100;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 90px);
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid rgba(49, 79, 115, 0.22);
  border-radius: 6px;
  background: rgba(248, 246, 241, 0.98);
  box-shadow: 0 8px 28px rgba(26, 42, 61, 0.18);
  font: 400 12px/1.45 var(--font);
  color: var(--ink, #1a2a3d);
}

.morning-review-panel[hidden] {
  display: none;
}

.morning-review-panel h3,
.morning-review-panel h4 {
  margin: 12px 0 4px;
  font: 600 13px/1.3 var(--font);
}

.morning-date {
  font: 500 11px/1.2 var(--font);
  color: rgba(49, 79, 115, 0.8);
}

.morning-model {
  padding: 8px 0;
  border-top: 1px solid rgba(49, 79, 115, 0.14);
}

.morning-standing {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 3px;
  font: 600 10px/1.4 var(--font);
  background: rgba(49, 79, 115, 0.1);
}

.morning-standing-recalculated { background: rgba(38, 120, 72, 0.16); color: rgb(28, 92, 56); }
.morning-standing-checked { background: rgba(49, 79, 115, 0.14); color: rgb(40, 66, 98); }
.morning-standing-not_checked { background: rgba(170, 110, 20, 0.18); color: rgb(130, 82, 10); }

.morning-outcome,
.morning-note {
  color: rgba(26, 42, 61, 0.66);
}

.morning-statement {
  margin: 4px 0;
}

.morning-table {
  width: 100%;
  margin: 6px 0;
  border-collapse: collapse;
  font: 400 11px/1.35 var(--font);
}

.morning-table th,
.morning-table td {
  padding: 2px 6px;
  border-bottom: 1px solid rgba(49, 79, 115, 0.1);
  text-align: left;
  vertical-align: top;
}

.morning-changed td {
  font-weight: 600;
}

.morning-four {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 10px;
  margin: 6px 0;
}

.morning-four dt {
  font-weight: 600;
}

.morning-four dd {
  margin: 0;
}

.morning-list {
  margin: 4px 0;
  padding-left: 18px;
}
