:root {
  --bg: #f3f3ed;
  --paper: #fff;
  --ink: #1e3439;
  --muted: #758184;
  --line: #e1e6e3;
  --green: #297965;
  --orange: #d66b38;
  --blue: #577c91;
  --sand: #c59750;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    13px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #d66b38;
  outline-offset: 3px;
}
button {
  transition:
    background 0.15s,
    box-shadow 0.15s;
}
button:hover {
  filter: brightness(0.97);
}
[hidden] {
  display: none !important;
}
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: 68px;
  background: #192f34;
  display: flex;
  align-items: center;
  flex-direction: column;
  z-index: 20;
  color: #d5e2df;
}
.brand {
  font-size: 37px;
  color: #fff;
  text-decoration: none;
  font-weight: 750;
  letter-spacing: -6px;
  margin: 15px 0;
}
.brand span {
  font-size: 20px;
  color: #c6d79e;
}
.rail-line {
  height: 1px;
  background: #385056;
  width: 28px;
  margin: 13px 0 21px;
}
.rail-button {
  background: none;
  border: 0;
  color: #8fa7a8;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  font-size: 24px;
  margin: 6px 0;
}
.rail-button.active {
  background: #344e50;
  color: #d3e3b0;
}
.rail-bottom {
  margin-top: auto;
  writing-mode: vertical-rl;
  letter-spacing: 3px;
  font: 10px var(--mono);
  padding: 24px;
}
.workspace {
  margin-left: 68px;
  padding: 0 28px;
  max-width: 2100px;
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 99px;
  gap: 18px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: var(--muted);
}
.eyebrow span {
  padding: 0 9px;
  color: #a8b1ad;
}
h1 {
  font-size: 25px;
  letter-spacing: -0.9px;
  line-height: 1.2;
  margin: 7px 0;
}
h1 span {
  font-size: 16px;
  font-weight: 400;
  border-left: 1px solid #c7ceca;
  margin-left: 15px;
  padding-left: 16px;
  color: #73807e;
  letter-spacing: 0;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.7px;
  margin: 7px 0;
}
h3 {
  font-size: 15px;
  letter-spacing: -0.3px;
  margin: 0;
}
p {
  color: var(--muted);
  margin: 5px 0 15px;
}
.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.button {
  border: 1px solid #d7ded8;
  background: #fff;
  border-radius: 5px;
  padding: 9px 13px;
  font-weight: 550;
  font-size: 12px;
  white-space: nowrap;
}
.button.dark {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.icon-button {
  border: 1px solid #d7ded8;
  border-radius: 50%;
  background: transparent;
  width: 29px;
  height: 29px;
}
.demo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eeedde;
  border: 1px solid #dedfc9;
  padding: 9px 13px;
  border-radius: 5px;
  font-size: 11px;
  color: #72704d;
}
.demo-banner strong {
  font: 10px var(--mono);
  letter-spacing: 0.6px;
}
.status-dot {
  height: 6px;
  width: 6px;
  border-radius: 100%;
  background: #a59446;
  flex-shrink: 0;
}
.demo-banner button {
  margin-left: auto;
  border: 0;
  background: none;
  font-size: 11px;
  color: #6b704f;
  white-space: nowrap;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 17px;
  border-bottom: 1px solid #dce0d8;
  gap: 10px;
}
.topbar nav {
  display: flex;
  gap: 25px;
}
.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 13px 0;
  font-weight: 550;
  color: var(--muted);
}
.tab.active {
  border-color: var(--ink);
  color: var(--ink);
}
.range-label {
  font: 10px var(--mono);
  color: #718079;
}
.kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 21px 0;
}
.kpi {
  border-right: 1px solid #d9dfd8;
  padding: 0 24px;
}
.kpi:first-child {
  padding-left: 0;
}
.kpi:last-child {
  border: 0;
}
.kpi-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 1px;
  color: var(--muted);
}
.kpi-value {
  font: 28px var(--mono);
  letter-spacing: -1px;
  margin: 5px 0;
}
.kpi-value small {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--muted);
}
.kpi-note {
  font-size: 11px;
  color: var(--muted);
}
main#view-trace {
  display: grid;
  grid-template-columns: 220px minmax(450px, 1fr) 310px;
  gap: 16px;
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  overflow: hidden;
}
.panel-title {
  padding: 18px 16px 12px;
  font-weight: 650;
  display: flex;
  justify-content: space-between;
}
.panel-title span {
  font: 11px var(--mono);
  background: #eff2ed;
  padding: 2px 6px;
  border-radius: 3px;
}
.search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 9px;
}
.search input {
  width: 100%;
  border: 0;
  outline: none;
  font-size: 12px;
}
.filter-row {
  display: flex;
  gap: 4px;
  margin: 10px 12px 14px;
}
.chip {
  font-size: 10px;
  border: 1px solid var(--line);
  padding: 5px 6px;
  background: white;
  border-radius: 4px;
  white-space: nowrap;
}
.chip.active {
  background: #e7eee5;
  border-color: #c6d7c4;
  color: #345d42;
}
.trace-item {
  display: block;
  width: 100%;
  background: #fff;
  border: 0;
  border-top: 1px solid #edf0eb;
  padding: 13px 15px;
  text-align: left;
  position: relative;
}
.trace-item.active {
  background: #eff4ee;
  box-shadow: inset 3px 0 #517d5b;
}
.trace-item-top {
  display: flex;
  justify-content: space-between;
  font: 11px var(--mono);
  font-weight: 600;
}
.trace-item-middle {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 8px;
}
.trace-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 10px var(--mono);
}
.mini-track {
  display: flex;
  gap: 2px;
  height: 4px;
  width: 76px;
}
.mini-track i {
  flex: 1;
  background: #89a995;
}
.mini-track i.wait {
  background: var(--sand);
}
.pill {
  border-radius: 3px;
  padding: 2px 5px;
  font: 9px var(--mono);
  background: #edf3ef;
  color: #50775e;
}
.pill.attention {
  background: #fff1e6;
  color: #a16237;
}
.pill.incomplete {
  background: #f0edf5;
  color: #88799b;
}
#trace-items {
  max-height: 690px;
  overflow: auto;
}
.list-note {
  padding: 17px 14px;
  color: var(--muted);
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.trace-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trace-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 20px 7px;
  align-items: center;
}
.trace-heading h2 {
  font: 22px var(--mono);
  letter-spacing: -1px;
}
.trace-heading p {
  font-size: 11px;
  margin-bottom: 6px;
}
.trace-heading .button {
  font-size: 10px;
  padding: 8px;
}
.trace-summary {
  display: flex;
  gap: 20px;
  margin: 0 20px 15px;
  color: var(--muted);
  font-size: 11px;
}
.trace-summary strong {
  color: var(--ink);
  font-family: var(--mono);
}
.timeline-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 15px;
  background: #fafbf8;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.segmented {
  display: flex;
  gap: 2px;
}
.segmented button,
.zoom-controls button {
  border: 0;
  background: transparent;
  font-size: 10px;
  padding: 4px 6px;
}
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}
.zoom-controls span {
  font: 10px var(--mono);
  min-width: 20px;
}
.zoom-controls button:not(:last-child) {
  font-size: 16px;
}
.timeline-scroll {
  overflow: auto;
  position: relative;
  max-height: 590px;
  scrollbar-width: thin;
}
.waterfall-inner {
  position: relative;
  min-width: 100%;
}
.timeline-axis,
.span-row {
  display: grid;
  grid-template-columns: 170px 1fr;
}
.timeline-axis {
  height: 34px;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 6;
  border-bottom: 1px solid var(--line);
}
.axis-title {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 7;
  padding: 10px 15px;
  font: 9px var(--mono);
  color: #85918b;
}
.axis-track {
  position: relative;
}
.tick {
  position: absolute;
  font: 9px var(--mono);
  top: 11px;
  color: #88958d;
  transform: translateX(-50%);
}
.tick:first-child {
  transform: none;
}
.tick:last-child {
  transform: translateX(-100%);
}
.span-row {
  height: 39px;
  border-bottom: 1px solid #f0f3ef;
}
.span-row.child {
  height: 31px;
}
.span-row.selected {
  background: #f0f5ef;
}
.row-label {
  position: sticky;
  left: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  background: inherit;
  background-color: #fff;
  padding: 0 8px 0 13px;
  border-right: 1px solid var(--line);
  gap: 6px;
  min-width: 0;
}
.selected .row-label {
  background: #f0f5ef;
}
.row-label .select-span {
  font-size: 11px;
  text-align: left;
  border: 0;
  background: none;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.child .row-label {
  padding-left: 30px;
}
.child .select-span {
  font-size: 10px;
  color: #718078;
}
.expander {
  border: 0;
  background: none;
  color: #81958b;
  width: 12px;
  padding: 0;
  font-size: 10px;
}
.row-number {
  font: 9px var(--mono);
  color: #a5b0a7;
}
.span-track {
  position: relative;
  background-image: linear-gradient(to right, #e8ede655 1px, transparent 1px);
  background-size: 20% 100%;
  cursor: crosshair;
}
.span-bar {
  position: absolute;
  top: 10px;
  height: 18px;
  min-width: 3px;
  border: 0;
  border-radius: 3px;
  background: #5c8b75;
  color: #fff;
  overflow: hidden;
  text-align: left;
  padding: 1px 7px;
  font: 9px var(--mono);
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px #00000005;
}
.span-bar.operation {
  background: #568770;
}
.span-bar.wait {
  background: #c39b5b;
  color: #fff;
}
.span-bar.transfer {
  background: #7797a6;
}
.span-bar.uncertain {
  background: repeating-linear-gradient(
    120deg,
    #b2a6bd,
    #b2a6bd 5px,
    #c7bfce 5px,
    #c7bfce 9px
  );
  border: 1px dashed #8e809b;
}
.selected .span-bar {
  outline: 2px solid #263f35;
  outline-offset: 2px;
}
.child .span-bar {
  height: 12px;
  top: 9px;
  opacity: 0.75;
  padding: 0 5px;
  font-size: 8px;
}
.ghost-bar {
  position: absolute;
  height: 4px;
  top: 32px;
  border-top: 2px dashed #8b9690;
  pointer-events: none;
}
.child .ghost-bar {
  top: 25px;
}
.cursor {
  position: absolute;
  top: 34px;
  bottom: 0;
  width: 1px;
  background: #dc6835;
  z-index: 3;
  pointer-events: none;
}
.cursor:before {
  content: "";
  position: absolute;
  top: 0;
  left: -4px;
  border-top: 7px solid #dc6835;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}
.legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  font-size: 9px;
  color: #78887f;
}
.legend span {
  display: flex;
  gap: 5px;
  align-items: center;
}
.legend-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
}
.legend-dot.operation {
  background: #568770;
}
.legend-dot.wait {
  background: #c39b5b;
}
.legend-dot.transfer {
  background: #7797a6;
}
.legend-dot.uncertain {
  background: #b2a6bd;
}
.legend-ghost {
  margin-left: auto;
}
.playback {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 12px 15px;
  background: #fafbf8;
}
.play-button {
  height: 30px;
  width: 30px;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 10px;
  flex-shrink: 0;
}
.playback .icon-button {
  border: 0;
  font-size: 16px;
}
.playback input {
  flex: 1;
  width: 60px;
  accent-color: var(--orange);
}
.playback output {
  font: 10px var(--mono);
  white-space: nowrap;
}
.playback select {
  border: 0;
  background: none;
  font: 10px var(--mono);
}
.section-heading {
  padding: 18px 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.section-heading select {
  font-size: 10px;
  background: #f7f9f4;
  border: 1px solid var(--line);
  padding: 7px;
  border-radius: 4px;
  max-width: 55%;
}
.section-heading h3 {
  margin-top: 3px;
}
.section-heading p {
  max-width: 620px;
}
#signal-chart {
  padding: 0 15px;
  height: 134px;
  cursor: crosshair;
}
#signal-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.chart-caption {
  padding: 8px 20px 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 10px;
  color: var(--muted);
}
#signal-value {
  font-family: var(--mono);
  white-space: nowrap;
  color: var(--ink);
}
.subtle {
  color: var(--muted);
  font-size: 10px;
}
.event-item {
  border: 0;
  background: white;
  display: grid;
  grid-template-columns: 60px 8px 1fr;
  gap: 12px;
  padding: 10px 20px;
  text-align: left;
  width: 100%;
  border-top: 1px solid #f0f3ee;
  font-size: 11px;
  align-items: center;
}
.event-item time {
  font: 10px var(--mono);
  color: #7c8c81;
}
.event-item i {
  width: 5px;
  height: 5px;
  border-radius: 100%;
  background: #91aa91;
}
.event-item.warn i {
  background: #d59648;
}
.event-item.future {
  opacity: 0.45;
}
.inspector {
  position: sticky;
  top: 16px;
}
.inspector-top {
  padding: 17px 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.demo-pill {
  font: 9px var(--mono);
  color: #997e43;
  border: 1px solid #e7d8ad;
  padding: 3px 6px;
  border-radius: 3px;
}
.inspector-heading-content {
  padding: 13px 18px 17px;
}
.inspector-heading-content h2 {
  font-size: 21px;
  line-height: 1.25;
  margin: 8px 0;
}
.stage-label {
  font: 10px var(--mono);
  color: var(--green);
}
.inspector-tabs {
  display: flex;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
  gap: 17px;
}
.inspector-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font-size: 11px;
  padding: 12px 0;
  color: #7a8881;
}
.inspector-tabs button.active {
  color: var(--ink);
  border-color: var(--ink);
}
#inspector-body {
  padding: 16px 18px;
  max-height: 740px;
  overflow: auto;
}
.metric-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 16px;
}
.metric-box {
  background: #f5f7f2;
  border: 1px solid #e6ebe2;
  padding: 12px 10px;
  border-radius: 5px;
}
.metric-box .value {
  font: 22px var(--mono);
  letter-spacing: -1px;
  margin: 5px 0;
}
.metric-box .label {
  font-size: 10px;
  color: var(--muted);
}
.micro-heading {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 20px 0 9px;
  color: #849187;
  font-weight: 650;
}
.property {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #eef1eb;
  font-size: 11px;
}
.property span {
  color: #7e8a82;
}
.property strong {
  font-weight: 550;
  text-align: right;
  max-width: 65%;
}
.notice {
  padding: 11px 12px;
  border: 1px solid #e5dec8;
  background: #faf7ee;
  color: #8b7956;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.65;
  margin: 12px 0;
}
.notice.green {
  background: #eef5ef;
  border-color: #dbe7d8;
  color: #62806b;
}
.context-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 5px;
  padding: 12px;
  width: 100%;
  margin: 8px 0;
  text-align: left;
  font-size: 12px;
}
.context-link small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
.evidence-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.evidence-item code {
  font-size: 10px;
  overflow-wrap: anywhere;
  color: #547064;
}
.evidence-item p {
  margin: 5px 0;
}
.coverage-badge {
  font: 9px var(--mono);
  display: inline-block;
  background: #edf3e8;
  color: #627c51;
  border-radius: 3px;
  padding: 3px 6px;
  margin: 3px 0;
}
.coverage-badge.missing {
  background: #f3ece6;
  color: #9e8062;
}
.coverage-badge.partial {
  background: #eff0f5;
  color: #7c829c;
}
.material-card {
  border: 1px solid var(--line);
  border-radius: 5px;
  margin: 10px 0;
  padding: 12px;
}
.material-card h3 {
  font-size: 13px;
}
.material-card .property:last-child {
  border: 0;
}
.empty {
  padding: 35px 20px;
  text-align: center;
  color: #7c8980;
}
.plant-panel,
.sources-panel {
  padding: 10px 8px 20px;
}
.plant-panel .section-heading,
.sources-panel .section-heading {
  align-items: start;
  padding-bottom: 25px;
}
#plant-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  padding: 15px 25px 35px;
  background: radial-gradient(#d9e0d5 0.6px, transparent 0.6px);
  background-size: 12px 12px;
}
.station {
  background: #fff;
  border: 1px solid #d7dfd3;
  border-radius: 6px;
  padding: 20px;
  text-align: left;
  position: relative;
  min-height: 145px;
}
.station.active {
  border-color: #d69259;
  background: #fffaf3;
  box-shadow: 0 0 0 3px #f1d9bc77;
}
.station .station-symbol {
  font-size: 24px;
  color: #7a9c85;
  margin-bottom: 15px;
}
.station .station-tag {
  font: 9px var(--mono);
  color: #86927f;
}
.station h3 {
  margin: 5px 0;
}
.station p {
  font-size: 11px;
  margin: 3px 0;
}
.station .arrow {
  position: absolute;
  right: -15px;
  top: 50%;
  color: #8b9d81;
}
.plant-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  padding: 22px 25px;
  border-top: 1px solid var(--line);
}
.plant-bottom p {
  font-size: 12px;
  margin: 10px 0;
}
#source-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 0 20px;
}
.source-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.source-card h3 {
  margin: 10px 0;
}
.source-card p {
  font-size: 12px;
  min-height: 54px;
}
.source-card code {
  font: 10px var(--mono);
  color: #6a7b71;
  overflow-wrap: anywhere;
}
.contract {
  padding: 25px;
  margin: 20px;
  border: 1px dashed #c7d3bf;
  border-radius: 6px;
  background: #f8faf5;
}
.contract p {
  font-size: 12px;
  max-width: 850px;
}
.contract code {
  font: 11px var(--mono);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 0;
  font: 9px var(--mono);
  letter-spacing: 0.6px;
  color: #94a08f;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 35px;
  max-width: 500px;
  color: var(--ink);
  box-shadow: 0 20px 100px #10282044;
}
dialog::backdrop {
  background: #1a302c88;
  backdrop-filter: blur(3px);
}
dialog .close {
  position: absolute;
  right: 15px;
  top: 15px;
}
dialog dl {
  display: grid;
  grid-template-columns: 100px 1fr;
  font-size: 12px;
  gap: 10px;
}
dialog dt {
  font-family: var(--mono);
}
dialog dd {
  margin: 0;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  border-radius: 6px;
  padding: 12px 20px;
  z-index: 50;
  display: none;
  box-shadow: 0 8px 30px #0002;
  max-width: 90vw;
}
#toast.visible {
  display: block;
}
.signal-unavailable {
  height: 115px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}
.active-reading {
  color: var(--orange) !important;
}
@media (min-width: 1600px) {
  main#view-trace {
    grid-template-columns: 240px minmax(500px, 1fr) 350px;
  }
  .workspace {
    padding: 0 36px;
  }
  .timeline-axis,
  .span-row {
    grid-template-columns: 190px 1fr;
  }
}
@media (max-width: 1200px) {
  main#view-trace {
    grid-template-columns: 190px minmax(360px, 1fr);
  }
  .inspector {
    grid-column: 2;
    position: static;
  }
  .trace-list {
    grid-row: 1 / span 2;
  }
  .workspace {
    padding: 0 18px;
  }
  .header-actions .button {
    font-size: 10px;
  }
  .demo-banner {
    flex-wrap: wrap;
  }
  .trace-heading {
    flex-wrap: wrap;
  }
  .kpi {
    padding: 0 15px;
  }
  #source-cards {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 760px) {
  .rail {
    width: 45px;
  }
  .rail-button {
    width: 35px;
  }
  .brand {
    font-size: 29px;
  }
  .workspace {
    margin-left: 45px;
    padding: 0 12px;
  }
  header {
    flex-wrap: wrap;
    padding: 15px 0;
    gap: 10px;
  }
  .header-actions {
    width: 100%;
  }
  h1 {
    font-size: 23px;
  }
  h1 span {
    font-size: 13px;
  }
  .demo-banner {
    font-size: 10px;
  }
  .demo-banner > span:nth-of-type(2) {
    width: 100%;
  }
  .topbar {
    align-items: start;
    flex-direction: column;
  }
  .topbar nav {
    gap: 17px;
  }
  .range-label {
    padding: 0 0 10px;
  }
  .kpis {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .kpi:nth-child(3) {
    padding-left: 0;
  }
  .kpi:nth-child(2) {
    border: 0;
  }
  main#view-trace {
    display: flex;
    flex-direction: column;
  }
  .trace-list,
  .trace-content,
  .inspector {
    width: 100%;
  }
  #trace-items {
    max-height: 185px;
  }
  .trace-item {
    padding: 10px 14px;
  }
  .list-note {
    display: none;
  }
  .trace-heading {
    padding: 16px;
  }
  .trace-summary {
    gap: 12px;
    flex-wrap: wrap;
  }
  .timeline-axis,
  .span-row {
    grid-template-columns: 140px 1fr;
  }
  .row-label {
    padding-left: 7px;
  }
  .row-label .select-span {
    font-size: 10px;
  }
  .child .row-label {
    padding-left: 16px;
  }
  .legend {
    gap: 8px;
  }
  .legend-ghost {
    margin-left: 0;
  }
  .playback {
    gap: 4px;
    padding: 10px;
  }
  .playback output {
    font-size: 9px;
  }
  .section-heading {
    padding: 15px 12px;
    gap: 6px;
  }
  .section-heading h3 {
    font-size: 13px;
  }
  .section-heading select {
    font-size: 9px;
  }
  .chart-caption {
    padding: 8px 12px;
    font-size: 9px;
  }
  #plant-map,
  #source-cards,
  .plant-bottom {
    grid-template-columns: 1fr;
  }
  .station .arrow {
    display: none;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  .contract {
    padding: 15px;
    margin: 10px;
  }
  .contract code {
    overflow-wrap: anywhere;
  }
  footer {
    flex-direction: column;
    gap: 5px;
  }
  .inspector {
    position: static;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.tick {
  white-space: nowrap;
}
#event-log {
  max-height: 310px;
  overflow: auto;
  scrollbar-width: thin;
}
.span-track .ghost-bar {
  max-width: 100%;
}
.button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
