:root {
  --base: #0f0f11;
  --surface: #131316;
  --surface-low: #18181b;
  --surface-mid: #1f1f22;
  --surface-high: #2a2a2d;
  --surface-bright: #353438;
  --line: #424754;
  --line-soft: #2b303a;
  --text: #e4e1e6;
  --muted: #c2c6d6;
  --faint: #8c909f;
  --primary: #adc6ff;
  --primary-strong: #4d8eff;
  --green: #4edea3;
  --violet: #ddb7ff;
  --warning: #ffd166;
  --danger: #ffb4ab;
  --radius: 8px;
  --font-ui: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-code: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.35;
  overflow: hidden;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.app-shell {
  display: grid;
  grid-template-columns: 48px 260px minmax(520px, 1fr) 320px;
  grid-template-rows: 48px minmax(0, 1fr) 28px;
  width: 100vw;
  height: 100vh;
  min-width: 960px;
  background: var(--base);
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 0 14px;
  background: var(--surface-low);
  border-bottom: 1px solid var(--line);
}

.brand-block,
.top-actions,
.menu-strip,
.pane-tools,
.status-line {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 10px;
  min-width: 224px;
}

.brand-lockup {
  width: 138px;
  height: auto;
  display: block;
  filter: invert(1);
}

.branch-chip {
  max-width: 74px;
  padding: 2px 7px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-strip {
  gap: 2px;
  height: 100%;
  flex: 1;
  min-width: 0;
}

.menu-strip button,
.terminal-tabs button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.menu-strip button {
  height: 100%;
  padding: 0 12px;
}

.menu-strip button:hover,
.menu-strip .is-active {
  color: var(--primary);
  background: var(--surface-mid);
}

.menu-strip .is-active {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.top-actions {
  gap: 8px;
  margin-left: auto;
}

.command-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.command-button {
  gap: 7px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
}

.command-button-primary {
  border-color: #c4d6ff;
  color: #08285c;
  background: var(--primary);
}

.icon-button {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  color: var(--muted);
  background: transparent;
}

.icon-button:hover,
.command-button:hover {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface-high);
}

.command-button-primary:hover {
  color: #061d42;
  background: #d8e2ff;
}

.app-symbol {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

.activity-rail {
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 6px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.activity-rail button {
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.activity-rail button:hover,
.activity-rail .is-active {
  color: var(--primary);
  border-color: var(--line-soft);
  background: var(--surface-mid);
}

.left-panel,
.right-panel {
  grid-row: 2;
  min-width: 0;
  overflow: hidden;
  background: var(--surface-low);
}

.left-panel {
  border-right: 1px solid var(--line);
}

.right-panel {
  display: flex;
  flex-direction: column;
  overflow: auto;
  border-left: 1px solid var(--line);
}

.panel-section {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.eyebrow,
.section-title {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.project-head h1 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.file-tree {
  list-style: none;
  padding: 8px 0 0;
  margin: 0;
}

.file-tree li {
  display: flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
}

.file-tree .folder {
  color: var(--text);
  font-weight: 650;
}

.file-tree .folder::before,
.file-tree .file::before {
  display: inline-block;
  width: 16px;
  color: var(--faint);
}

.file-tree .folder::before {
  content: ">";
}

.file-tree .is-open::before {
  transform: rotate(90deg);
}

.file-tree .file {
  padding-left: 24px;
}

.file-tree .file::before {
  content: "";
  width: 9px;
  height: 12px;
  margin-right: 7px;
  border: 1px solid var(--faint);
  border-radius: 2px;
}

.file-tree .is-active {
  color: var(--primary);
  background: var(--surface-high);
  box-shadow: inset 2px 0 0 var(--primary);
}

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

.primitive {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
  text-align: left;
  background: var(--surface);
}

.primitive:hover,
.primitive.is-active {
  color: var(--primary);
  border-color: var(--primary-strong);
  background: #152031;
}

.primitive-detail {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
}

.primitive-detail strong {
  color: var(--text);
}

.primitive-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.primitive-detail div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.primitive-detail code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--primary);
  background: var(--surface-mid);
  font-size: 11px;
}

.workspace {
  grid-row: 2;
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr) 206px;
  min-width: 0;
  min-height: 0;
  background: var(--base);
}

.tabbar {
  display: flex;
  min-width: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.tab {
  min-width: 124px;
  height: 40px;
  padding: 0 13px;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.tab:hover,
.tab.is-active {
  color: var(--primary);
  background: var(--base);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.editor-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(330px, 42%);
  min-height: 0;
}

.code-pane {
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(173, 198, 255, 0.04), rgba(173, 198, 255, 0.04)) 0 92px / 100% 24px no-repeat,
    var(--base);
}

.code-lines {
  min-width: 580px;
  margin: 0;
  padding: 22px 24px 22px 64px;
  font-family: var(--font-code);
  font-size: 14px;
  line-height: 24px;
  counter-reset: code;
}

.code-lines li {
  position: relative;
  min-height: 24px;
  padding-left: 16px;
  white-space: pre;
}

.code-lines li.has-breakpoint::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -26px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 180, 171, 0.12);
}

.code-lines li.is-executing {
  border-radius: 5px;
  color: #f6f8ff;
  background: rgba(77, 142, 255, 0.18);
}

.code-lines li::marker {
  color: var(--faint);
}

.syntax-comment {
  color: var(--faint);
}

.syntax-keyword {
  color: var(--violet);
}

.syntax-function,
.syntax-number {
  color: var(--primary);
}

.syntax-string {
  color: var(--green);
}

.figure-pane {
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: var(--surface);
}

.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-weight: 650;
}

.plot-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 52%, rgba(77, 142, 255, 0.12), transparent 34%),
    var(--base);
}

.plot-stage-large {
  width: min(72vw, 760px);
  max-width: 92%;
  aspect-ratio: 1.55;
}

.plot-svg {
  display: block;
  width: min(92%, 640px);
  height: auto;
  max-height: 88%;
}

.plot-bg {
  fill: #090a0e;
  stroke: var(--line-soft);
}

.grid-lines path {
  fill: none;
  stroke: #263244;
  stroke-width: 1;
}

.trace {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  filter: drop-shadow(0 0 6px rgba(77, 142, 255, 0.44));
}

.trace-main {
  stroke: url("#traceBlue");
}

.trace-secondary {
  stroke: url("#traceViolet");
}

.plot-label {
  fill: var(--muted);
  font-family: var(--font-code);
  font-size: 13px;
}

.plot-label-y {
  transform: rotate(-90deg);
  transform-origin: 12px 170px;
}

.notebook-view,
.figure-view,
.parity-view {
  min-height: 0;
  overflow: auto;
  background: var(--base);
}

.notebook-cell {
  width: min(840px, calc(100% - 48px));
  margin: 24px auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-low);
}

.notebook-cell h2 {
  margin: 6px 0 8px;
  font-size: 24px;
  line-height: 1.22;
}

.notebook-cell p {
  color: var(--muted);
}

.notebook-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.notebook-meta span {
  padding: 4px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
}

pre,
code {
  font-family: var(--font-code);
}

.notebook-cell pre {
  margin: 16px 0;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--base);
}

.matrix-output {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  gap: 1px;
  width: max-content;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-code);
}

.matrix-output span {
  display: grid;
  place-items: center;
  height: 36px;
  background: var(--surface-mid);
}

.notebook-output-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.run-report {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.run-report li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 8px;
  min-height: 36px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
}

.run-report strong {
  color: var(--primary);
  font-family: var(--font-code);
}

.run-report span {
  color: var(--muted);
}

.notebook-figure {
  display: grid;
  place-items: center;
  min-height: 260px;
  margin-top: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--base);
}

.figure-view {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.plot-gallery {
  padding: 12px;
  border-right: 1px solid var(--line);
  background: var(--surface-low);
}

.plot-thumb {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: left;
  background: var(--surface);
}

.plot-thumb.is-active {
  color: var(--primary);
  border-color: var(--primary);
}

.thumb-visual {
  display: block;
  height: 76px;
  border-radius: 6px;
  background: var(--base);
}

.thumb-lines {
  background:
    linear-gradient(150deg, transparent 0 38%, rgba(77, 142, 255, 0.9) 39% 41%, transparent 42%),
    linear-gradient(18deg, transparent 0 50%, rgba(221, 183, 255, 0.8) 51% 53%, transparent 54%),
    var(--base);
}

.thumb-surface {
  background: radial-gradient(ellipse at 50% 50%, rgba(78, 222, 163, 0.56), transparent 58%), var(--base);
}

.thumb-bars {
  background:
    linear-gradient(to top, rgba(173, 198, 255, 0.85) 42%, transparent 42%) 34% 72% / 9px 44px no-repeat,
    linear-gradient(to top, rgba(173, 198, 255, 0.65) 64%, transparent 64%) 47% 72% / 9px 44px no-repeat,
    linear-gradient(to top, rgba(173, 198, 255, 0.75) 30%, transparent 30%) 60% 72% / 9px 44px no-repeat,
    var(--base);
}

.large-figure {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 0;
  place-items: stretch;
  min-width: 0;
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 48px 48px;
}

.large-figure .plot-stage-large {
  align-self: center;
  justify-self: center;
}

.plot-inspector {
  align-self: stretch;
  padding: 18px;
  border-left: 1px solid var(--line);
  background: rgba(19, 19, 22, 0.95);
}

.plot-inspector h3,
.inspector-panel h3 {
  margin: 10px 0;
  color: var(--text);
  font-size: 16px;
}

.plot-inspector dl,
.inspector-panel dl {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
}

.plot-inspector dt,
.inspector-panel dt {
  color: var(--faint);
  font-size: 12px;
  text-transform: uppercase;
}

.plot-inspector dd,
.inspector-panel dd {
  min-width: 0;
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  font-family: var(--font-code);
  font-size: 12px;
}

.debugger-view {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: var(--base);
}

.debug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 14px;
}

.debug-panel {
  min-width: 0;
  min-height: 180px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-low);
}

.debug-panel ul,
.debug-panel ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.debug-panel li code {
  display: block;
  margin-top: 4px;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debug-panel table {
  min-width: 420px;
}

.diagnostic-ok strong {
  color: var(--green);
  margin-right: 8px;
}

.diagnostic-warn strong {
  color: var(--warning);
  margin-right: 8px;
}

.parity-view {
  padding: 18px;
}

.parity-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-low);
}

.parity-hero h2 {
  margin: 5px 0 7px;
  font-size: 24px;
  line-height: 1.18;
}

.parity-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
}

.capability-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.capability-summary article,
.proof-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-low);
}

.capability-summary strong {
  display: block;
  color: var(--primary);
  font-size: 24px;
  line-height: 1;
}

.capability-summary span,
.proof-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.proof-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.proof-card strong {
  color: var(--text);
}

.proof-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.capability-table-wrap {
  margin-top: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-low);
}

.capability-table {
  min-width: 1180px;
  margin: 0;
}

.capability-table th,
.capability-table td {
  vertical-align: top;
  padding: 10px;
}

.capability-table td:first-child span,
.capability-table small {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-family: var(--font-ui);
  font-size: 11px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 12px;
  text-transform: uppercase;
}

.status-validated {
  color: #082817;
  border-color: var(--green);
  background: var(--green);
}

.status-demonstrated {
  color: #061d42;
  border-color: var(--primary);
  background: var(--primary);
}

.status-partial {
  color: #261a00;
  border-color: var(--warning);
  background: var(--warning);
}

.status-planned,
.status-research {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface-mid);
}

.tiny-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tiny-list span {
  display: inline-flex;
  max-width: 210px;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface);
  font-family: var(--font-code);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-hidden {
  display: none;
}

.terminal-panel {
  min-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.terminal-tabs {
  display: flex;
  height: 34px;
  border-bottom: 1px solid var(--line);
}

.terminal-tabs button {
  padding: 0 12px;
  text-transform: uppercase;
}

.terminal-tabs .is-active,
.menu-strip .is-active {
  color: var(--primary);
}

.terminal-tabs .is-active {
  color: var(--primary);
  box-shadow: inset 0 -2px 0 var(--primary);
}

.terminal-panel pre {
  height: auto;
  margin: 0;
  padding: 12px;
  overflow: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 20px;
}

.terminal-body {
  display: grid;
  grid-template-rows: minmax(0, 1fr) 38px;
  height: calc(100% - 34px);
  overflow: hidden;
}

.command-entry {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  color: var(--green);
  background: #090a0e;
  font-family: var(--font-code);
}

.command-entry span {
  justify-self: end;
  padding-right: 6px;
}

.command-entry input,
.assistant-compose input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.command-entry input:focus,
.assistant-compose input:focus {
  box-shadow: inset 0 -2px 0 var(--primary);
}

.command-entry .icon-button {
  width: 28px;
  height: 28px;
  color: var(--green);
}

.workspace-table {
  flex: 0 0 auto;
}

table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 7px 4px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

td {
  color: var(--text);
  font-family: var(--font-code);
}

.workspace-table tbody tr {
  cursor: pointer;
}

.workspace-table tbody tr:hover,
.workspace-table tbody tr.is-active {
  background: var(--surface-mid);
}

.workspace-table tbody tr.is-active {
  box-shadow: inset 2px 0 0 var(--primary);
}

.assistant-panel {
  display: grid;
  gap: 10px;
}

.assistant-thread {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.status-line {
  gap: 8px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(78, 222, 163, 0.12);
}

.assistant-message {
  padding: 10px;
  border: 1px solid #2c3650;
  border-radius: 8px;
  color: var(--text);
  background: #111827;
}

.assistant-message strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
}

.assistant-message p {
  margin: 0;
  color: var(--muted);
}

.assistant-message.user {
  border-color: var(--line);
  background: var(--surface-mid);
}

.assistant-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.assistant-compose input {
  padding: 0 9px;
}

.inspector-panel {
  display: grid;
  gap: 10px;
}

.inspector-panel pre {
  max-height: 170px;
  margin: 10px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--text);
  background: var(--base);
  font-size: 12px;
  line-height: 18px;
}

.mini-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-code);
}

.mini-matrix span {
  display: grid;
  place-items: center;
  min-height: 28px;
  color: var(--text);
  background: var(--surface-mid);
}

.muted {
  color: var(--muted);
}

.brand-assets {
  min-height: 0;
  overflow: auto;
}

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

.asset-grid figure {
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f7f7f7;
}

.asset-grid .dark-asset {
  background: var(--base);
}

.asset-grid img {
  display: block;
  width: 100%;
  height: 58px;
  object-fit: contain;
}

.invert-lockup {
  filter: invert(1);
}

.asset-grid figcaption {
  margin-top: 6px;
  color: #22242a;
  font-size: 11px;
  font-weight: 700;
}

.dark-asset figcaption {
  color: var(--muted);
}

.statusbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 0 12px;
  border-top: 1px solid var(--line);
  color: var(--green);
  background: #08090b;
  font-family: var(--font-code);
  font-size: 12px;
}

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

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 48px 224px minmax(480px, 1fr);
  }

  .right-panel {
    display: none;
  }

  .capability-summary,
  .proof-board {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-rows: 48px auto auto 28px;
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    gap: 8px;
    padding: 0 8px;
  }

  .brand-block {
    min-width: 0;
  }

  .brand-lockup {
    width: 112px;
  }

  .branch-chip,
  .menu-strip,
  .top-actions .command-button:nth-child(2) {
    display: none;
  }

  .activity-rail {
    grid-row: 2 / 4;
  }

  .left-panel {
    grid-column: 2;
    grid-row: 2;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workspace {
    grid-column: 2;
    grid-row: 3;
    grid-template-rows: 40px minmax(520px, auto) 220px;
    overflow-x: hidden;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

  .notebook-output-grid,
  .figure-view,
  .large-figure,
  .debug-grid,
  .capability-summary,
  .proof-board {
    grid-template-columns: 1fr;
  }

  .parity-hero {
    display: grid;
  }

  .plot-inspector {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .figure-pane {
    min-height: 320px;
    border-top: 1px solid var(--line);
  }

  .statusbar {
    grid-row: 4;
  }

  .statusbar span:nth-child(n+2) {
    display: none;
  }
}
