.sg-workbench-page {
  --wb-bg: #05090d;
  --wb-panel: #0b1117;
  --wb-panel-2: #0e161e;
  --wb-line: #20303d;
  --wb-line-soft: #17232d;
  --wb-text: #edf5f7;
  --wb-muted: #8ca0ad;
  --wb-cyan: #63e5e0;
  --wb-amber: #f4ad48;
  --wb-red: #ff706f;
  min-height: calc(100vh - 64px);
  color: var(--wb-text);
  background:
    linear-gradient(rgba(99, 229, 224, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 229, 224, .025) 1px, transparent 1px),
    var(--wb-bg);
  background-size: 42px 42px;
  font-family: Inter, "Segoe UI", sans-serif;
}

.wb-topbar { display: flex; align-items: center; min-height: 72px; padding: 0 24px; border-bottom: 1px solid var(--wb-line); background: rgba(5, 9, 13, .96); }
.wb-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--wb-text); text-decoration: none; }
.wb-brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #37626a; color: var(--wb-cyan); background: #091218; font: 800 11px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; box-shadow: inset 0 0 18px rgba(99, 229, 224, .06); }
.wb-brand-copy { display: grid; gap: 2px; }
.wb-brand-copy strong { font-size: 12px; letter-spacing: .17em; }
.wb-brand-copy small { color: #667d8d; font: 9px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .13em; }
.wb-return-link { display: inline-flex; align-items: center; min-height: 44px; margin-left: 24px; padding-left: 24px; border-left: 1px solid var(--wb-line); color: #adc0c9; font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.wb-return-link:hover, .wb-return-link:focus-visible { color: var(--wb-cyan); }
.wb-case-pill { margin-left: 30px; padding-left: 30px; border-left: 1px solid var(--wb-line); color: var(--wb-muted); font: 11px/1.3 "SFMono-Regular", Consolas, monospace; letter-spacing: .05em; text-transform: uppercase; }
.wb-case-pill b { margin-left: 7px; color: var(--wb-text); font-weight: 650; }
.wb-live { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; color: #9fb2bc; font: 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.wb-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--wb-cyan); box-shadow: 0 0 12px rgba(99, 229, 224, .8); }

.wb-brief { display: flex; align-items: flex-end; gap: 28px; padding: 30px 28px 25px; border-bottom: 1px solid var(--wb-line); background: linear-gradient(105deg, rgba(15, 28, 36, .96), rgba(7, 12, 17, .96)); }
.wb-brief-copy { max-width: 780px; }
.wb-eyebrow { margin: 0 0 8px; color: var(--wb-amber); font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .16em; text-transform: uppercase; }
.wb-brief h1 { margin: 0; font-size: clamp(28px, 3vw, 43px); font-weight: 620; letter-spacing: -.035em; }
.wb-brief p:last-child { max-width: 760px; margin: 10px 0 0; color: #a7b7c1; font-size: 14px; line-height: 1.55; }
.wb-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.wb-download { display: inline-flex; min-height: 38px; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid #2a414e; color: #c6d5da; background: #0b151c; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.wb-download:hover { border-color: var(--wb-cyan); color: var(--wb-cyan); }
.wb-download::before { content: "↓"; color: var(--wb-cyan); }

.wb-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--wb-line); background: var(--wb-panel); }
.wb-metric { min-height: 82px; padding: 15px 20px; border-right: 1px solid var(--wb-line-soft); }
.wb-metric:last-child { border-right: 0; }
.wb-metric span { display: block; margin-bottom: 10px; color: #69808f; font: 700 9px/1.1 "SFMono-Regular", Consolas, monospace; letter-spacing: .13em; text-transform: uppercase; }
.wb-metric strong { font: 600 23px/1.1 "SFMono-Regular", Consolas, monospace; letter-spacing: -.04em; }
.wb-metric small { display: block; margin-top: 4px; color: var(--wb-muted); font-size: 10px; }
.wb-metric .wb-status-ready { color: var(--wb-cyan); font-size: 17px; letter-spacing: .02em; }

.wb-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); grid-template-rows: auto minmax(310px, auto); min-height: 660px; }
.wb-source-pane, .wb-inspector { background: rgba(9, 15, 21, .97); }
.wb-source-pane { grid-column: 1; grid-row: 1 / span 2; border-right: 1px solid var(--wb-line); }
.wb-inspector { grid-column: 2; grid-row: 2; min-width: 0; border-top: 1px solid var(--wb-line); }
.wb-pane-head { display: flex; min-height: 45px; align-items: center; padding: 0 15px; border-bottom: 1px solid var(--wb-line); color: #728896; font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .13em; text-transform: uppercase; }
.wb-tree { padding: 13px 10px; }
.wb-tree-group { margin: 0 0 8px; }
.wb-tree-label { display: flex; align-items: center; gap: 8px; padding: 8px; color: #8196a2; font-size: 11px; text-transform: uppercase; }
.wb-tree-label::before { content: "⌄"; color: #4c6878; }
.wb-tree-item { display: grid; grid-template-columns: 9px 1fr auto; align-items: center; gap: 9px; width: 100%; padding: 10px 9px 10px 25px; border: 1px solid transparent; color: #aebec7; background: transparent; font: 12px/1.2 inherit; text-align: left; }
.wb-tree-item.is-active { border-color: #25434c; color: var(--wb-text); background: rgba(99, 229, 224, .07); }
.wb-tree-item i { width: 7px; height: 7px; border-radius: 1px; background: var(--wb-cyan); box-shadow: 0 0 8px rgba(99, 229, 224, .45); }
.wb-tree-item b { color: #67808f; font: 600 10px/1 "SFMono-Regular", Consolas, monospace; }
.wb-source-note { margin: 18px 13px; padding: 14px; border: 1px solid var(--wb-line-soft); color: #8296a3; background: #080e13; font-size: 11px; line-height: 1.55; }
.wb-source-note strong { display: block; margin-bottom: 7px; color: var(--wb-amber); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }

.wb-stream { grid-column: 2; grid-row: 1; min-width: 0; background: rgba(5, 9, 13, .94); }
.wb-toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 150px 150px; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--wb-line); background: var(--wb-panel-2); }
.wb-toolbar label { min-width: 0; margin: 0; }
.wb-toolbar select { width: 100%; }
.sg-workbench-page .visually-hidden { position: absolute !important; overflow: hidden !important; width: 1px !important; height: 1px !important; padding: 0 !important; border: 0 !important; margin: -1px !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; }
.wb-control { min-height: 38px; padding: 0 11px; border: 1px solid #263845; border-radius: 0; outline: 0; color: var(--wb-text); background: #071017; font: 11px/1 "SFMono-Regular", Consolas, monospace; }
.wb-control:focus { border-color: var(--wb-cyan); box-shadow: 0 0 0 1px rgba(99, 229, 224, .18); }
.wb-search { position: relative; }
.wb-search::before { position: absolute; top: 12px; left: 11px; color: #5e7887; content: "⌕"; }
.wb-search input { width: 100%; padding-left: 30px; box-sizing: border-box; }
.wb-table-wrap { overflow: auto; max-height: 420px; }
.wb-event-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.wb-event-table th { position: sticky; z-index: 2; top: 0; height: 35px; padding: 0 10px; border-bottom: 1px solid var(--wb-line); color: #6f8491; background: #0b131a; font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.wb-event-table th:nth-child(1) { width: 52px; }
.wb-event-table th:nth-child(2) { width: 98px; }
.wb-event-table th:nth-child(3) { width: 75px; }
.wb-event-table th:nth-child(4) { width: 138px; }
.wb-event-table th:nth-child(5) { width: 86px; }
.wb-event-table td { overflow: hidden; height: 42px; padding: 0 10px; border-bottom: 1px solid #111d25; color: #a7b6bf; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.wb-event-row { cursor: pointer; outline: none; }
.wb-event-row:hover td, .wb-event-row:focus td { background: #0d1820; }
.wb-event-row.is-selected td { background: rgba(99, 229, 224, .08); }
.wb-event-row.is-selected td:first-child { box-shadow: inset 2px 0 var(--wb-cyan); }
.wb-record { color: #5e7482 !important; font-family: "SFMono-Regular", Consolas, monospace; }
.wb-event-id { color: #dbe8eb !important; font: 700 11px/1 "SFMono-Regular", Consolas, monospace; }
.wb-time { color: #93a8b4 !important; font-family: "SFMono-Regular", Consolas, monospace; }
.wb-audit { display: inline-flex; align-items: center; gap: 6px; }
.wb-audit::before { width: 6px; height: 6px; border-radius: 50%; background: #4fbf89; content: ""; }
.wb-event-row.is-failure .wb-audit { color: #ff9e9d; }
.wb-event-row.is-failure .wb-audit::before { background: var(--wb-red); box-shadow: 0 0 8px rgba(255, 112, 111, .6); }
.wb-event-row.is-error .wb-audit { color: #ffb08f; }
.wb-event-row.is-error .wb-audit::before { background: var(--wb-amber); box-shadow: 0 0 8px rgba(244, 173, 72, .5); }
.wb-load-row { padding: 15px; text-align: center; }
.wb-load-more { min-height: 36px; padding: 0 17px; border: 1px solid #2c4553; color: #a9bec8; background: #0a1319; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.wb-empty { padding: 70px 30px; color: #708592; text-align: center; }

.wb-inspector-empty { display: grid; min-height: 250px; padding: 35px; place-content: center; color: #6f8390; text-align: center; }
.wb-inspector-empty[hidden] { display: none; }
.wb-inspector-empty span { display: grid; width: 46px; height: 46px; margin: 0 auto 14px; place-items: center; border: 1px solid #27404c; color: var(--wb-cyan); background: #0b151b; font: 20px/1 monospace; }
.wb-inspector-empty strong { margin-bottom: 7px; color: #b7c6ce; font-size: 13px; }
.wb-inspector-empty small { max-width: 220px; line-height: 1.5; }
.wb-detail { display: none; }
.wb-detail.is-open { display: block; }
.wb-detail-head { padding: 17px 16px 15px; border-bottom: 1px solid var(--wb-line); }
.wb-detail-head span { color: var(--wb-amber); font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }
.wb-detail-head h2 { margin: 8px 0 0; font-size: 18px; font-weight: 620; }
.wb-detail-tabs { display: flex; border-bottom: 1px solid var(--wb-line); }
.wb-detail-tab { min-height: 38px; padding: 0 16px; border: 0; border-right: 1px solid var(--wb-line-soft); color: #718795; background: #0a1117; font: 700 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.wb-detail-tab.is-active { color: var(--wb-cyan); background: #0e1920; box-shadow: inset 0 -2px var(--wb-cyan); }
.wb-detail-body { overflow: auto; max-height: 340px; padding: 18px; }
.wb-general-message { margin: 0 0 17px; padding: 13px; border-left: 2px solid var(--wb-cyan); color: #c7d4d9; background: #0a141a; font-size: 12px; line-height: 1.55; }
.wb-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; }
.wb-field-grid div { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid #15212a; }
.wb-field-grid dt { overflow-wrap: anywhere; color: #6f8491; font: 9px/1.35 "SFMono-Regular", Consolas, monospace; text-transform: uppercase; }
.wb-field-grid dd { overflow-wrap: anywhere; margin: 0; color: #b9c8ce; font: 10px/1.45 "SFMono-Regular", Consolas, monospace; }
.wb-xml { margin: 0; color: #a8c8ce; font: 10px/1.55 "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.wb-flag-console { margin: 0 18px 20px; padding: 18px; border: 1px solid rgba(244, 173, 72, .62); background: linear-gradient(110deg, rgba(244, 173, 72, .09), rgba(9, 15, 21, .96) 68%); box-shadow: inset 3px 0 var(--wb-amber), 0 0 28px rgba(244, 173, 72, .06); }
.wb-flag-console[hidden] { display: none; }
.wb-flag-kicker { margin: 0 0 8px; color: var(--wb-amber); font: 700 10px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .14em; text-transform: uppercase; }
.wb-flag-console h3 { margin: 0; color: var(--wb-text); font-size: 18px; font-weight: 620; }
.wb-flag-console > p { max-width: 760px; margin: 7px 0 14px; color: #a7b7c1; font-size: 13px; line-height: 1.5; }
.wb-gold-flag { display: inline-block; margin: 0 0 15px; padding: 10px 13px; border: 1px solid rgba(244, 173, 72, .44); color: #ffc66f; background: rgba(244, 173, 72, .08); font: 800 15px/1.2 "SFMono-Regular", Consolas, monospace; letter-spacing: .035em; text-shadow: 0 0 16px rgba(244, 173, 72, .4); user-select: all; }
.wb-flag-entry { display: grid; grid-template-columns: minmax(250px, 520px) auto; gap: 9px; align-items: start; }
.sg-completion-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.sg-completion-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 13px; border: 1px solid #31505f; color: #c5d7dc; background: #08131a; font: 700 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.sg-completion-actions a:first-child { border-color: var(--wb-amber); color: #ffd184; background: rgba(244, 173, 72, .08); }
.wb-flag-entry input { width: 100%; box-sizing: border-box; }
.wb-flag-submit { min-height: 38px; padding: 0 17px; border: 1px solid var(--wb-amber); color: #161008; background: var(--wb-amber); font: 800 10px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.wb-flag-submit:hover, .wb-flag-submit:focus-visible { background: #ffc66f; }
.wb-flag-result { min-height: 18px; margin: 10px 0 0 !important; color: #9bb0bb !important; font: 700 10px/1.4 "SFMono-Regular", Consolas, monospace !important; text-transform: uppercase; }
.wb-flag-console.is-complete { border-color: #ffd283; background: linear-gradient(110deg, rgba(244, 173, 72, .15), rgba(9, 15, 21, .96) 72%); }
.wb-flag-console.is-complete .wb-flag-result { color: #ffc66f !important; }
.wb-statusbar { display: flex; min-height: 35px; align-items: center; gap: 18px; padding: 0 15px; border-top: 1px solid var(--wb-line); color: #657b89; background: #070c10; font: 9px/1 "SFMono-Regular", Consolas, monospace; letter-spacing: .07em; text-transform: uppercase; }
.wb-statusbar span:last-child { margin-left: auto; }

@media (max-width: 1180px) {
  .wb-shell { grid-template-columns: 190px minmax(520px, 1fr); }
  .wb-inspector { grid-column: 2; min-height: 300px; }
  .wb-detail-body { max-height: 360px; }
}

@media (max-width: 780px) {
  .wb-topbar { padding: 0 15px; }
  .wb-case-pill { display: none; }
  .wb-live { display: none; }
  .wb-return-link { margin-left: auto; padding-left: 12px; }
  .wb-brief { align-items: stretch; flex-direction: column; padding: 24px 16px; }
  .wb-downloads { margin-left: 0; }
  .wb-metrics { grid-template-columns: repeat(2, 1fr); }
  .wb-shell { display: block; }
  .wb-source-pane { border-right: 0; border-bottom: 1px solid var(--wb-line); }
  .wb-tree { display: flex; overflow: auto; padding: 8px; }
  .wb-tree-group { display: contents; }
  .wb-tree-label, .wb-source-note { display: none; }
  .wb-tree-item { min-width: 138px; padding: 9px; }
  .wb-toolbar { grid-template-columns: 1fr 1fr; }
  .wb-search { grid-column: 1 / -1; }
  .wb-table-wrap { max-height: 480px; }
  .wb-field-grid { grid-template-columns: 1fr; }
  .wb-flag-entry { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .wb-brand-copy { display: none; }
  .wb-return-link { max-width: 225px; font-size: 9px; text-align: right; }
}
