.telemetry-event-record-workbench {
  --ter-line: rgba(152, 204, 223, 0.31);
  --ter-aqua: #69dfc9;
  --ter-amber: #f3c18e;
  color: #e6f2f5;
}
.telemetry-event-record-workbench * { min-width: 0; }
.telemetry-event-record-workbench :is(p, li, span) { overflow-wrap: anywhere; }
.telemetry-event-record-workbench button { min-height: 44px; }
.telemetry-event-record-workbench [hidden] { display: none !important; }
.ter-source-study { display: grid; gap: 14px; padding: 16px; border: 1px solid rgba(255, 215, 131, .58); border-radius: 12px; background: linear-gradient(145deg, rgba(13, 39, 44, .96), rgba(7, 24, 32, .96)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.ter-source-head { display: grid; gap: 6px; }
.ter-source-head h4, .ter-source-response h5 { margin: 0; color: #f3f7ed; font-size: 1rem; line-height: 1.3; }
.ter-source-head p, .ter-source-response p { margin: 0; color: #c7dee0; font-size: .76rem; line-height: 1.5; }
.ter-source-kicker { color: #ffd783; font-size: .67rem; font-weight: 850; letter-spacing: .08em; }
.ter-source-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 1.2fr); gap: 12px; align-items: end; }
.ter-source-focus { display: flex; flex-wrap: wrap; gap: 8px; }
.telemetry-event-record-workbench .ter-source-focus button { padding: 9px 12px; border: 1px solid #789c9b; color: #dbece7; background: rgba(7, 26, 29, .7); }
.telemetry-event-record-workbench .ter-source-focus button[aria-pressed="true"] { border-color: #ffd783; color: #102b2c; background: #ffd783; }
.ter-source-time { display: grid; gap: 6px; color: #e1efec; font-size: .74rem; }
.ter-source-time input { width: 100%; accent-color: #ffd783; }
.ter-source-time-output { color: #ffd783; font-size: .73rem; font-variant-numeric: tabular-nums; }
.ter-source-window-bar { position: relative; height: 7px; border: 1px solid rgba(255, 215, 131, .5); border-radius: 20px; background: rgba(126, 189, 176, .26); }
.ter-source-window-mark { position: absolute; top: -2px; width: 40%; height: 9px; border-radius: 20px; background: #ffd783; }
.ter-source-strips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ter-source-lead { display: grid; gap: 6px; margin: 0; padding: 9px; border: 1px solid rgba(126, 189, 176, .32); border-radius: 9px; background: rgba(5, 21, 28, .72); }
.ter-source-lead[data-focus="true"] { border-color: #ffd783; box-shadow: 0 0 0 1px rgba(255, 215, 131, .25); }
.ter-source-lead figcaption { color: #e6f2e8; font-size: .68rem; line-height: 1.35; }
.ter-source-lead canvas { display: block; width: 100%; height: 148px; border-radius: 5px; background: #071a1d; }
.ter-source-readout { margin: 0; color: #c8eee3; font-size: .71rem; line-height: 1.45; }
.ter-source-response { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(126, 189, 176, .31); border-radius: 9px; background: rgba(3, 16, 24, .52); }
.ter-source-response-field { display: grid; gap: 5px; color: #e4f0ee; font-size: .73rem; font-weight: 700; }
.ter-source-response-field small { color: #b8d3d4; font-size: .67rem; font-weight: 400; }
.ter-source-response-field :is(input, textarea) { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid #668e90; border-radius: 7px; color: #f1f8f5; background: #0a222b; font: inherit; font-weight: 400; line-height: 1.4; }
.ter-source-response-field input { min-height: 44px; }
.ter-source-response-field textarea { resize: vertical; min-height: 84px; }
.ter-source-response-field :is(input, textarea):focus-visible, .telemetry-event-record-workbench button:focus-visible, .ter-source-time input:focus-visible, .ter-source-link:focus-visible { outline: 3px solid #ffd783; outline-offset: 2px; }
.ter-source-response > button { justify-self: start; }
.ter-source-feedback { min-height: 1.4em; }
.ter-source-model { padding: 10px 12px; border-left: 3px solid #ffd783; border-radius: 0 7px 7px 0; background: rgba(255, 215, 131, .09); }
.ter-source-model summary { color: #ffe3a4; font-size: .77rem; font-weight: 800; cursor: pointer; }
.ter-source-model p { margin: 8px 0 0; }
.ter-source-boundary { margin: 0; padding: 9px 11px; border-left: 3px solid #ffd783; color: #f5e2bc; background: rgba(255, 215, 131, .08); font-size: .71rem; line-height: 1.5; }
.ter-source-link { color: #b9e7ff; font-size: .71rem; text-decoration: underline; text-underline-offset: 2px; }
.telemetry-event-record-workbench .telemetry-lab-role-lens button { min-height: 44px; }
.ter-episode,
.ter-panel { padding: 14px; border: 1px solid var(--ter-line); border-radius: 10px; background: rgba(6, 19, 30, 0.66); }
.ter-episode { display: grid; gap: 13px; border-color: rgba(105, 223, 201, 0.45); }
.ter-eyebrow { margin: 0; color: var(--ter-aqua); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.ter-patient { margin: 0; color: #b9d3dd; font-size: 0.75rem; }
.ter-episode-line { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; position: relative; }
.ter-episode-line::before { content: ""; position: absolute; top: 12px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, var(--ter-aqua) 0 50%, var(--ter-amber) 50% 100%); }
.ter-time-marker { display: grid; align-content: start; gap: 3px; position: relative; padding-top: 24px; color: #e1f2f1; font-size: 0.71rem; text-align: center; }
.ter-time-marker::before { content: ""; position: absolute; top: 5px; left: calc(50% - 7px); width: 14px; height: 14px; border: 2px solid #08222a; border-radius: 50%; background: var(--ter-aqua); box-shadow: 0 0 0 1px var(--ter-aqua); }
.ter-time-marker.ter-after::before { background: var(--ter-amber); box-shadow: 0 0 0 1px var(--ter-amber); }
.ter-time-marker[data-selected="true"]::before { box-shadow: 0 0 0 1px currentColor, 0 0 0 5px rgba(105, 223, 201, 0.2); }
.ter-time-marker.ter-after[data-selected="true"]::before { box-shadow: 0 0 0 1px currentColor, 0 0 0 5px rgba(243, 193, 142, 0.2); }
.ter-time-marker strong { font-size: 0.73rem; }
.ter-time-marker span { color: #b8d4dc; }
.ter-body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(255px, 0.8fr); gap: 14px; align-items: start; }
.ter-panel { display: grid; align-content: start; gap: 12px; }
.ter-panel h4 { margin: 0; font-size: 0.95rem; }
.ter-note { margin: 0; color: #bad2da; font-size: 0.75rem; line-height: 1.5; }
.ter-card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.telemetry-event-record-workbench .ter-card { display: grid; align-content: start; gap: 5px; min-height: 104px; padding: 11px 12px; border-left: 4px solid #74b6d7; }
.telemetry-event-record-workbench .ter-card[data-lane="bedside"] { border-left-color: var(--ter-amber); }
.telemetry-event-record-workbench .ter-card[data-lane="handoff"] { border-left-color: var(--ter-aqua); }
.ter-card-meta { color: #a8d4e3; font-size: 0.68rem; font-weight: 800; }
.ter-card[data-lane="bedside"] .ter-card-meta { color: #f6d5b4; }
.ter-card-detail { color: #c2d5dc; font-size: 0.7rem; font-weight: 450; line-height: 1.45; }
.ter-choice-group { display: grid; gap: 8px; padding-top: 9px; border-top: 1px solid var(--ter-line); }
.ter-choice-group strong { color: #d5e9ed; font-size: 0.76rem; }
.ter-choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.telemetry-event-record-workbench .ter-choice-row button { width: 100%; }
.ter-progress { margin: 0; color: #c7e6e8; font-size: 0.77rem; font-weight: 800; }
.ter-record-list { display: grid; gap: 7px; margin: 0; padding-left: 22px; }
.ter-record-list li { padding: 8px 10px; border-left: 3px solid #78b8d1; border-radius: 0 7px 7px 0; background: rgba(57, 102, 125, 0.16); }
.ter-record-list li strong,
.ter-record-list li span { display: block; font-size: 0.73rem; line-height: 1.45; }
.ter-record-list li strong { color: #d6f1f3; }
.ter-record-list li span { color: #bdd4dd; }
.ter-record-list .ter-empty { color: #bdd4dd; font-size: 0.74rem; }
.ter-uncertainty { margin: 0; padding: 9px 11px; border-left: 3px solid var(--ter-amber); color: #f6dcbb; background: rgba(243, 193, 142, 0.09); font-size: 0.74rem; line-height: 1.5; }
.ter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.telemetry-event-record-workbench .ter-primary { border-color: var(--ter-aqua); color: #09282a; background: var(--ter-aqua); }
.telemetry-event-record-workbench .ter-primary:hover { background: #8cead8; }
.ter-audit { padding: 11px 12px; border: 1px solid rgba(243, 193, 142, 0.4); border-radius: 8px; background: rgba(118, 76, 46, 0.18); }
.ter-audit strong { color: #ffe1bc; font-size: 0.78rem; }
.ter-audit ul { display: grid; gap: 5px; margin: 7px 0 0; padding-left: 18px; color: #e6dbd0; font-size: 0.74rem; line-height: 1.45; }
.ter-safety { margin: 0; padding: 9px 12px; border-left: 3px solid var(--ter-amber); color: #cddce0; background: rgba(243, 193, 142, 0.07); font-size: 0.73rem; line-height: 1.5; }
@media (max-width: 750px) {
  .ter-body { grid-template-columns: minmax(0, 1fr); }
  .ter-source-controls, .ter-source-strips { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 420px) {
  .ter-card-list { grid-template-columns: minmax(0, 1fr); }
  .ter-choice-row { grid-template-columns: minmax(0, 1fr); }
  .ter-time-marker strong { font-size: 0.66rem; }
  .ter-time-marker span { font-size: 0.64rem; }
}
