@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/InstrumentSans-Variable.woff2") format("woff2");
  font-display: swap;
  font-stretch: 75% 100%;
  font-style: normal;
  font-weight: 400 700;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-display: swap;
  font-style: normal;
  font-weight: 500;
}

:root {
  --bg: #0b0d0e;
  --panel: #101315;
  --panel-raised: #15191c;
  --panel-soft: #1a1f22;
  --border: #282e32;
  --border-strong: #394146;
  --text: #f4f5f5;
  --text-soft: #c7cccf;
  --muted: #858d92;
  --accent: #b7f34a;
  --accent-soft: rgba(183, 243, 74, 0.11);
  --blue: #86a8ff;
  --danger: #ff7968;
  --warning: #eaa657;
  --header-bg: rgba(11, 13, 14, 0.96);
  --input-active: #0d1011;
  --accent-contrast: #10130c;
  --accent-hover: #c3ff58;
  --grid-line: rgba(255, 255, 255, 0.018);
  --toolbar-bg: rgba(11, 13, 14, 0.9);
  --panel-glass: rgba(16, 19, 21, 0.78);
  --panel-glass-soft: rgba(16, 19, 21, 0.68);
  --panel-glass-strong: rgba(16, 19, 21, 0.8);
  --graph-edge: #41494e;
  --graph-node: #121619;
  --graph-subtle: #616a6f;
  --diagram-bg: #f4f1e9;
  --brand-filter: grayscale(1) brightness(1.75);
  --sans: "Instrument Sans", Inter, Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f2f3f3;
  --panel: #ffffff;
  --panel-raised: #f8f9f9;
  --panel-soft: #eceeef;
  --border: #d8dcde;
  --border-strong: #aeb7bc;
  --text: #121617;
  --text-soft: #3e484d;
  --muted: #68747a;
  --accent: #76a91a;
  --accent-soft: rgba(118, 169, 26, 0.12);
  --blue: #315ccf;
  --danger: #bd4134;
  --warning: #a45b08;
  --header-bg: rgba(242, 243, 243, 0.96);
  --input-active: #ffffff;
  --accent-contrast: #10130c;
  --accent-hover: #84bb21;
  --grid-line: rgba(11, 13, 14, 0.035);
  --toolbar-bg: rgba(242, 243, 243, 0.92);
  --panel-glass: rgba(255, 255, 255, 0.84);
  --panel-glass-soft: rgba(255, 255, 255, 0.72);
  --panel-glass-strong: rgba(255, 255, 255, 0.88);
  --graph-edge: #aeb7bc;
  --graph-node: #fbfcfc;
  --graph-subtle: #7b878d;
  --diagram-bg: #f4f1e9;
  --brand-filter: grayscale(1) brightness(0.28);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue);
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: -9999px;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 650;
}

.skip-link:focus {
  left: 12px;
}

.app-header {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}

.product-lockup,
.header-actions,
.runtime-state,
.run-meta,
.graph-legend,
.control-strip,
.implementation-mark,
.approval-actions {
  display: flex;
  align-items: center;
}

.product-lockup {
  min-width: 0;
  gap: 11px;
}

.product-lockup > img {
  flex: 0 0 auto;
  filter: var(--brand-filter);
}

.product-copy {
  display: grid;
  min-width: 0;
  line-height: 1.2;
}

.product-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-copy small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  justify-content: flex-end;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.header-actions > a {
  padding: 7px 8px;
  border-radius: 6px;
  color: var(--text-soft);
}

.header-actions > a:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.theme-toggle {
  position: relative;
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-soft);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  background: var(--panel-soft);
  color: var(--text);
}

.theme-icon {
  position: absolute;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-icon-sun,
:root[data-theme="light"] .theme-icon-moon {
  display: none;
}

:root[data-theme="light"] .theme-icon-sun {
  display: block;
}

.runtime-state {
  gap: 7px;
  padding-right: 4px;
}

.state-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(234, 166, 87, 0.1);
}

.state-dot.online {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.state-dot.offline {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 121, 104, 0.1);
}

.header-badge {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10px;
}

.console-shell {
  display: grid;
  min-height: calc(100vh - 64px);
  grid-template-columns: 304px minmax(520px, 1fr) 344px;
  background: var(--bg);
}

.input-rail,
.inspector-rail {
  min-width: 0;
  background: var(--panel);
}

.input-rail {
  display: flex;
  flex-direction: column;
  padding: 20px 18px 16px;
  border-right: 1px solid var(--border);
}

.rail-heading {
  margin-bottom: 20px;
}

.section-kicker,
.control-label,
label > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rail-heading h1,
.run-toolbar h2,
.graph-panel h3,
.inspector-heading h3,
.card-heading h4,
.empty-state h4 {
  margin: 0;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.rail-heading h1 {
  margin-top: 4px;
  font-size: 20px;
}

.rail-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.control-group {
  margin-bottom: 18px;
}

.control-label {
  display: block;
  margin-bottom: 8px;
}

.scenario-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.scenario-chip {
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  text-align: left;
}

.scenario-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-soft);
}

.scenario-chip.active {
  border-color: rgba(183, 243, 74, 0.45);
  background: var(--accent-soft);
  color: var(--accent);
}

#analysis-form {
  display: grid;
  gap: 13px;
}

label {
  display: grid;
  gap: 6px;
}

.field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(80px, 0.6fr);
  gap: 8px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-soft);
  transition: border-color 120ms ease, background 120ms ease;
}

input,
select {
  min-height: 38px;
  padding: 8px 10px;
}

textarea {
  min-height: 104px;
  resize: vertical;
  padding: 10px;
  line-height: 1.45;
}

input:hover,
select:hover,
textarea:hover,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--border-strong);
  background: var(--input-active);
}

.range-field {
  position: relative;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.range-field > span {
  grid-column: 1;
}

.range-field input {
  min-height: 16px;
  grid-column: 1;
  padding: 0;
  accent-color: var(--accent);
}

.range-field output {
  min-width: 28px;
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
}

.primary-action,
.secondary-action {
  min-height: 40px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
}

.primary-action:hover {
  background: var(--accent-hover);
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: wait;
  opacity: 0.55;
}

.primary-action.compact {
  min-height: 34px;
  justify-content: center;
  padding: 7px 10px;
  font-size: 12px;
}

.secondary-action {
  padding: 7px 10px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
}

.secondary-action:hover {
  background: var(--panel-soft);
}

.input-boundary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.input-boundary span {
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.implementation-mark {
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
}

.implementation-mark img {
  flex: 0 0 auto;
  border-radius: 4px;
}

.decision-pane {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
}

.run-toolbar {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--toolbar-bg);
  backdrop-filter: blur(12px);
}

.run-toolbar h2 {
  margin-top: 3px;
  font-size: 18px;
}

.run-meta {
  gap: 12px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.status-pill {
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 9px;
  text-transform: capitalize;
}

.status-pill.pending {
  border-color: rgba(234, 166, 87, 0.45);
  background: rgba(234, 166, 87, 0.09);
  color: var(--warning);
}

.status-pill.approved {
  border-color: rgba(183, 243, 74, 0.4);
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.rejected,
.status-pill.failed {
  border-color: rgba(255, 121, 104, 0.4);
  background: rgba(255, 121, 104, 0.08);
  color: var(--danger);
}

.empty-state {
  display: grid;
  min-height: 550px;
  flex: 1;
  place-items: center;
  align-content: center;
  padding: 40px 24px;
  text-align: center;
}

.empty-graph {
  position: relative;
  width: 132px;
  height: 92px;
  margin-bottom: 24px;
}

.empty-graph::before,
.empty-graph::after {
  position: absolute;
  content: "";
}

.empty-graph::before {
  inset: 14px 20px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
}

.empty-graph::after {
  top: 45px;
  left: 30px;
  width: 72px;
  border-top: 1px solid var(--border-strong);
  transform: rotate(-17deg);
}

.empty-graph span {
  position: absolute;
  z-index: 1;
  width: 8px;
  height: 8px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--text-soft);
}

.empty-graph span:nth-child(1) {
  top: 33px;
  left: 21px;
}

.empty-graph span:nth-child(2) {
  top: 20px;
  right: 28px;
}

.empty-graph span:nth-child(3) {
  right: 19px;
  bottom: 21px;
}

.empty-graph span:nth-child(4) {
  bottom: 17px;
  left: 53px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(183, 243, 74, 0.35);
}

.empty-state h4 {
  font-size: 18px;
}

.empty-state p {
  max-width: 360px;
  margin: 7px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.empty-path {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.empty-path i {
  width: 24px;
  border-top: 1px solid var(--border-strong);
}

.results {
  display: grid;
  min-width: 0;
  min-height: 0;
  flex: 1;
  grid-template-rows: auto minmax(360px, 1fr) auto;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--border);
}

.kpi-grid article {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 15px 18px;
  border-right: 1px solid var(--border);
  background: var(--panel-glass);
}

.kpi-grid article:last-child {
  border-right: 0;
}

.kpi-grid span,
.kpi-grid small {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-grid span {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.kpi-grid strong {
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-grid article:first-child strong {
  color: var(--accent);
  font-size: 24px;
}

.graph-panel {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 18px 22px 12px;
}

.graph-panel > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.graph-panel h3 {
  margin-top: 2px;
  font-size: 14px;
}

.graph-legend {
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.graph-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.graph-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-evidence {
  background: var(--blue);
}

.legend-signal {
  background: var(--text-soft);
}

.legend-decision {
  background: var(--accent);
}

.graph-viewport {
  display: flex;
  min-width: 0;
  min-height: 330px;
  flex: 1;
  align-items: center;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-glass-soft);
}

#evidence-graph {
  width: 100%;
  min-width: 700px;
  height: auto;
  min-height: 330px;
}

.graph-edge {
  fill: none;
  stroke: var(--graph-edge);
  stroke-width: 1.2;
}

.graph-edge.active {
  stroke: var(--accent);
  stroke-width: 1.5;
}

.graph-node rect,
.graph-node circle {
  fill: var(--graph-node);
  stroke: var(--border-strong);
  stroke-width: 1.2;
}

.graph-node.evidence rect {
  fill: rgba(134, 168, 255, 0.08);
  stroke: rgba(134, 168, 255, 0.65);
}

.graph-node.signal circle,
.graph-node.score circle {
  fill: var(--panel-raised);
}

.graph-node.score circle {
  stroke: var(--accent);
}

.graph-node.signal.muted circle {
  stroke-dasharray: 4 4;
}

.graph-node.decision rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
}

.node-label {
  fill: var(--text);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
}

.node-meta {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  text-transform: uppercase;
}

.control-strip {
  min-height: 44px;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 22px;
  border-top: 1px solid var(--border);
  background: var(--panel-glass-strong);
  color: var(--muted);
  font-size: 9px;
}

.control-strip span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-strip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.workspace-footer {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 18px;
  padding: 7px 22px;
  border-top: 1px solid var(--border);
  color: var(--graph-subtle);
  font-family: var(--mono);
  font-size: 8px;
}

.inspector-rail {
  border-left: 1px solid var(--border);
}

.inspector-tabs {
  display: grid;
  height: 50px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.inspector-tabs button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.inspector-tabs button:hover {
  color: var(--text-soft);
}

.inspector-tabs button.active {
  background: var(--panel-soft);
  color: var(--text);
}

.inspector-panel {
  min-height: calc(100vh - 114px);
  padding: 20px 18px;
}

.inspector-heading {
  margin-bottom: 18px;
}

.inspector-heading h3 {
  margin-top: 4px;
  font-size: 17px;
}

.agent-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-steps li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.step-index,
.step-time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.step-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.step-copy strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.step-copy span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.agent-steps:not(:empty) + .timeline-placeholder {
  display: none;
}

.timeline-placeholder {
  margin: 0;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.approval-card {
  margin-top: 22px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.card-heading h4 {
  margin-top: 3px;
  font-size: 14px;
}

.approval-card > p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 10px;
}

.approval-card dl,
.proof-list {
  margin: 0;
}

.approval-card dl > div,
.proof-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.approval-card dt,
.proof-list dt {
  color: var(--muted);
  font-size: 10px;
}

.approval-card dd,
.proof-list dd {
  margin: 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.approval-actions {
  gap: 8px;
  margin-top: 12px;
}

.approval-actions .primary-action {
  flex: 1;
}

.decision-message {
  min-height: 0;
  margin-bottom: 0 !important;
  color: var(--text-soft) !important;
}

.eval-summary {
  display: grid;
  padding: 18px;
  border: 1px solid rgba(183, 243, 74, 0.25);
  border-radius: 8px;
  background: var(--accent-soft);
}

.eval-summary strong {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 500;
}

.eval-summary span {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
}

.proof-list {
  margin-top: 14px;
}

.proof-list dd {
  color: var(--accent);
}

.inspector-note {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

.inspector-note strong {
  color: var(--text-soft);
  font-size: 10px;
}

.inspector-note p,
.stack-note {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.architecture-preview {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--diagram-bg);
}

.architecture-preview:hover {
  border-color: var(--border-strong);
}

.architecture-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.architecture-preview span {
  padding: 10px 12px;
  background: var(--bg);
  color: var(--text-soft);
  font-size: 10px;
}

.boundary-list {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.boundary-list li {
  display: grid;
  gap: 2px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.boundary-list strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.boundary-list span {
  color: var(--muted);
  font-size: 9px;
}

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

.technology-grid article {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg);
}

.technology-grid img {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  object-fit: contain;
}

.technology-grid span {
  color: var(--text-soft);
  font-size: 10px;
}

.stack-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

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

  .inspector-rail {
    min-height: 520px;
    grid-column: 1 / -1;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .inspector-panel {
    min-height: 0;
  }

  .technology-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .header-actions .header-badge:last-of-type {
    display: none;
  }
}

@media (max-width: 820px) {
  .app-header {
    min-height: 58px;
  }

  .product-copy small,
  .header-actions > a,
  .header-badge {
    display: none;
  }

  .console-shell {
    display: block;
    min-height: 0;
  }

  .input-rail {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .implementation-mark {
    margin-top: 8px;
  }

  .decision-pane {
    min-height: 720px;
  }

  .run-toolbar {
    min-height: 70px;
  }

  .inspector-rail {
    border-top: 1px solid var(--border);
  }

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

@media (max-width: 560px) {
  .app-header {
    padding-inline: 12px;
  }

  .runtime-state {
    font-size: 10px;
  }

  #runtime-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .input-rail {
    padding: 18px 14px;
  }

  .field-pair {
    grid-template-columns: 1fr;
  }

  .run-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
  }

  .run-meta {
    width: 100%;
    justify-content: space-between;
  }

  .empty-state {
    min-height: 480px;
  }

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

  .kpi-grid article:nth-child(2) {
    border-right: 0;
  }

  .kpi-grid article:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .graph-panel {
    padding: 16px 14px 10px;
  }

  .graph-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .graph-viewport {
    min-height: 300px;
  }

  .control-strip,
  .workspace-footer {
    gap: 10px;
    padding-inline: 14px;
  }

  .workspace-footer {
    flex-wrap: wrap;
  }

  .inspector-panel {
    padding: 18px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
