.ot-console {
  --ot-line: #35505e;
  --ot-muted: #b4c5cd;
  --ot-accent: #94f1df;
  --ot-glow: rgba(107, 229, 207, .12);
  --ot-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  color-scheme: dark;
  margin-top: .85rem;
  border: 1px solid #405764;
  border-radius: 15px;
  background: linear-gradient(127deg, #162834, #132330 43%, #101c27);
  color: #f1f7f8;
  overflow: hidden;
  font: 400 1rem/1.45 "DM Sans", "Segoe UI", sans-serif;
}
.ot-console *, .ot-console *::before, .ot-console *::after { box-sizing: border-box; }
.ot-console [hidden] { display: none !important; }
.ot-console[data-channel="gate"] { --ot-accent: #ffd5ab; --ot-glow: rgba(242, 177, 124, .13); }
.ot-console[data-channel="growth"] { --ot-accent: #d2c1ff; --ot-glow: rgba(184, 158, 250, .13); }
.ot-console button, .ot-console select {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.ot-console button:focus-visible, .ot-console select:focus-visible { outline: 2px solid #f8e7bb; outline-offset: 2px; z-index: 2; }
.ot-rail { height: 4px; background: repeating-linear-gradient(120deg, transparent 0 4px, #3a5865 4px 5px), #16242c; border-bottom: 1px solid #38505a; }
.ot-rail span { display: block; width: 23%; height: 100%; background: linear-gradient(90deg, #456870, var(--ot-accent)); }
.ot-header, .ot-title, .ot-controls, .ot-follow, .ot-footer, .ot-trace, .ot-screen-head, .ot-screen-head > span, .ot-actions, .ot-bus button { display: flex; align-items: center; }
.ot-header { justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.15rem 1.35rem; }
.ot-title { gap: .85rem; }
.ot-terminal-icon {
  display: grid; place-items: center; width: 2.9rem; height: 2.9rem; border: 1px solid #62818c; border-radius: 8px;
  color: var(--ot-accent); box-shadow: inset 0 0 0 3px #14212d, inset 0 0 0 4px #35515e; background: linear-gradient(145deg, #2b414d, #10232c);
}
.ot-terminal-icon svg { width: 1.8rem; height: 1.8rem; }
.ot-eyebrow, .ot-source-label { color: #9eb7c4; font: 600 .68rem/1.3 var(--ot-mono); text-transform: uppercase; letter-spacing: .11em; }
.ot-title h3 { font-size: clamp(1.25rem, 2.3vw, 1.65rem); line-height: 1.2; letter-spacing: -.03em; margin: .1rem 0 0; color: #eff7fa; }
.ot-controls { flex-wrap: wrap; gap: .8rem; }
.ot-selector { display: flex; flex-direction: column; gap: .17rem; font-size: .68rem; color: #c2d1d7; }
.ot-selector select { max-width: 100%; min-height: 2.15rem; padding: .25rem .35rem; border: 1px solid #4e6673; border-radius: 5px; background: #101b25; color: #e9f3f6; font-size: .8rem; }
.ot-follow { align-self: flex-end; gap: .5rem; min-height: 2.15rem; border: 1px solid #4e6673; border-radius: 5px; background: #10212a; padding: .35rem .65rem; font-size: .79rem !important; }
.ot-follow i, .ot-screen-head i { display: inline-block; flex: 0 0 auto; width: .46rem; height: .46rem; border-radius: 50%; background: #7993a1; }
.ot-follow[aria-pressed="true"] i, .ot-screen-head i { background: var(--ot-accent); box-shadow: 0 0 6px var(--ot-glow); }
.ot-bus { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0 1.35rem; gap: .62rem; position: relative; }
.ot-bus::before { content: ""; position: absolute; left: 3%; right: 3%; top: calc(50% - 1px); height: 3px; border-block: 1px solid #688694; }
.ot-bus button {
  position: relative; justify-content: center; gap: .45rem; min-height: 2.55rem; border: 1px solid #405664; border-radius: 6px; padding: .3rem .2rem; background: #142531; color: #b9ccd6; font-size: .84rem; font-weight: 600;
}
.ot-bus button svg, .ot-trace svg { width: 1.18rem; height: 1.18rem; flex-shrink: 0; }
.ot-bus button[aria-pressed="true"] { border-color: var(--ot-accent); color: var(--ot-accent); background: linear-gradient(var(--ot-glow),var(--ot-glow)), #12232d; box-shadow: inset 0 -2px 0 var(--ot-accent); }
.ot-console button:hover { border-color: #9cabb1; color: #fff; }
.ot-content { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); align-items: stretch; gap: 1.5rem; padding: 1.15rem 1.35rem; }
.ot-screen {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0;
  border: 1px solid #466471; border-radius: 7px; padding: .45rem; background: #0a151c; box-shadow: inset 0 0 0 3px #192d38, 0 2px 5px #070f1455;
}
.ot-screen-head { justify-content: space-between; flex-wrap: wrap; gap: .25rem .55rem; padding: .48rem .6rem; border-bottom: 1px solid #27414d; }
.ot-screen-head > span { gap: .55rem; color: #e7f3f8; font-size: .88rem; font-weight: 650; }
.ot-screen-head small { font: 500 .68rem/1.4 var(--ot-mono); color: #bbcbd0; }
.ot-schematic {
  display: grid; place-items: center; min-width: 0;
  background: linear-gradient(90deg, #73919e0c 1px, transparent 1px) 0 0/17px 17px, linear-gradient(#73919e0c 1px, transparent 1px) 0 0/17px 17px, radial-gradient(ellipse at 50% 50%, var(--ot-glow), transparent 73%), #0d1b23;
}
.ot-schematic svg { display: block; width: 100%; height: auto; max-height: 190px; }
.ot-schematic text { font-family: var(--ot-mono); }
.ot-svg-meta { font-size: 9.8px; fill: #a1b8c4; font-weight: 600; letter-spacing: .45px; }
.ot-svg-label { font-size: 11px; fill: #e2edf1; }
.ot-svg-big { font-size: 22px; fill: var(--ot-accent); font-weight: 700; letter-spacing: -.7px; }
.ot-svg-value { font-size: 14px; fill: var(--ot-accent); font-weight: 650; }
.ot-wire, .ot-track, .ot-contour, .ot-signal, .ot-radar { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.ot-wire { stroke: #709ba7; stroke-width: 1.4; }
.ot-track { stroke: var(--ot-accent); stroke-width: 2; }
.ot-contour { stroke: #38505d; stroke-width: 1.15; }
.ot-signal { stroke: var(--ot-accent); stroke-width: 2.1; }
.ot-socket { fill: #173743; stroke: #85a5b1; stroke-width: 1.4; }
.ot-socket.hot { stroke: var(--ot-accent); }
.ot-lamp { fill: var(--ot-accent); }
.ot-chip { fill: #19323c; stroke: #5b818d; }
.ot-plate { fill: #19303b; stroke: var(--ot-accent); stroke-width: 1.35; }
.ot-bar-track { fill: #21343f; }
.ot-bar { fill: #739aa8; }
.ot-bar.hot { fill: var(--ot-accent); }
.ot-radar { stroke: #5a7286; }
.ot-sector { fill: var(--ot-glow); stroke: var(--ot-accent); stroke-width: .7; }
.ot-slot.filled { fill: #254959; stroke: #779cab; }
.ot-slot.added { fill: #4f4165; stroke: var(--ot-accent); }
.ot-slot.empty { fill: #182532; stroke: #8c9ca6; stroke-dasharray: 3 3; }
.ot-screen-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .18rem .45rem; border-top: 1px solid #27414d; padding: .45rem .6rem; color: #afc4cf; font: 400 .69rem/1.45 var(--ot-mono); }
.ot-screen-foot span + span::before { content: "›"; display: inline-block; margin-right: .45rem; color: var(--ot-accent); font-weight: 700; }
.ot-payload { min-width: 0; align-self: center; }
.ot-payload h4 { margin: 0; font-size: clamp(1.14rem, 2.1vw, 1.65rem); line-height: 1.2; letter-spacing: -.025em; color: #eff6f8; }
.ot-payload p { max-width: 53ch; margin: .5rem 0 .8rem; color: #bccad3; font-size: .89rem; line-height: 1.45; }
.ot-payload dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; margin: 0; }
.ot-payload dl > div { border-top: 1px solid #3a5360; padding-top: .42rem; }
.ot-payload dt { font-size: .71rem; color: #a6bcc7; }
.ot-payload dd { margin: .1rem 0 0; font-size: .89rem; font-weight: 650; color: #ecf5f6; }
.ot-related { display: flex; flex-wrap: wrap; gap: .28rem; margin: 0 0 .55rem; }
.ot-related button, .ot-actions button { min-height: 2.05rem; padding: .26rem .65rem; border: 1px solid #476270; border-radius: 5px; color: #d2e1e6; background: #142530; font-size: .77rem; }
.ot-related button[aria-pressed="true"], .ot-actions button[aria-pressed="true"] { color: var(--ot-accent); border-color: var(--ot-accent); }
.ot-actions { flex-wrap: wrap; gap: .42rem; margin-top: .8rem; }
.ot-actions button { color: #edf4f5; font-size: .8rem; background: linear-gradient(#253b48,#1d313e); }
.ot-footer { justify-content: space-between; flex-wrap: wrap; gap: .65rem; padding: .55rem 1.35rem; border-top: 1px solid #344956; background: #0b182280; }
.ot-trace { min-height: 2.1rem; gap: .5rem; border: 1px solid transparent; border-radius: 4px; background: transparent; padding: .25rem .3rem; color: #c9e6e5; font-size: .82rem !important; }
.ot-trace b { color: var(--ot-accent); font: inherit; }
.ot-caption { font: 400 .69rem/1.45 var(--ot-mono); color: #a9bfcb; }
.ot-source { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: .3rem .85rem; padding: .8rem 1.35rem 1rem; border-top: 1px dotted #48616d; background: #101d28; }
.ot-source strong { font: 650 .85rem/1.4 var(--ot-mono); color: var(--ot-accent); }
.ot-source p { grid-column: 2; margin: 0; color: #c2d1d8; font-size: .84rem; }
.ot-assist { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .ot-content { grid-template-columns: 1fr; gap: 1rem; }
  .ot-controls { gap: .5rem; }
  .ot-bus button { flex-direction: column; gap: .12rem; font-size: .72rem; }
  .ot-payload { align-self: start; }
  .ot-schematic svg { max-height: 165px; }
}
@media (max-width: 530px) {
  .ot-header, .ot-content, .ot-footer, .ot-source { padding-left: .72rem; padding-right: .72rem; }
  .ot-header { gap: .7rem; }
  .ot-controls { width: 100%; align-items: end; }
  .ot-selector { flex: 1; min-width: 0; }
  .ot-follow { font-size: .73rem !important; }
  .ot-bus { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .35rem; margin: 0 .72rem; }
  .ot-bus::before { display: none; }
  .ot-bus button { flex-direction: row; gap: .25rem; min-height: 2.35rem; }
  .ot-content { padding-top: .8rem; }
  .ot-screen { padding: .3rem; }
  .ot-screen-head, .ot-screen-foot { padding-inline: .35rem; }
  .ot-footer { gap: .25rem; }
  .ot-source { grid-template-columns: 1fr; }
  .ot-source p { grid-column: auto; }
}
