@scope (.looper-product) {
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 12px/1.45 var(--sans);
}
button, input, select, textarea { font: inherit; }
button, select, input, textarea {
  border: 1px solid var(--line-bright);
  border-radius: 0;
  background: #0b0e0e;
  color: var(--text);
}
input, select, textarea { width: 100%; padding: 7px 8px; outline: none; }
textarea { min-height: 82px; resize: vertical; font-family: var(--mono); font-size: 11px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: inset 2px 0 var(--accent); }
button {
  min-height: 30px;
  padding: 5px 10px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: 10px;
  font-weight: 700;
}
button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
button:disabled { color: var(--faint); cursor: not-allowed; }
button.danger { border-color: #653333; color: var(--danger); }
label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.mono, code, time { font-family: var(--mono); }
.hidden { display: none !important; }

.shell-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 10, .96);
}
.wordmark { display: flex; align-items: baseline; gap: 8px; letter-spacing: .15em; font-weight: 800; }
.wordmark .mark { display: grid; place-items: center; width: 20px; height: 20px; color: #06100b; background: var(--accent); font-family: var(--mono); }
.wordmark small { color: var(--muted); font-size: 9px; }
.header-link { margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line-bright); color: var(--muted); font: 9px var(--mono); letter-spacing: .08em; }
.header-link:hover { color: var(--accent); text-decoration: none; }
.connection { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.dot { width: 6px; height: 6px; background: var(--faint); }
.dot.ok { background: var(--accent); box-shadow: 0 0 8px #65f5b366; }
.dot.error { background: var(--danger); }
.notice { padding: 7px 14px; border-bottom: 1px solid var(--line); background: #17130a; color: var(--warn); font-family: var(--mono); }
.notice.error { background: #1a0c0c; color: var(--danger); }

.shell { display: grid; grid-template-columns: 278px minmax(0, 1fr); min-height: calc(100vh - 42px); }
.rail { border-right: 1px solid var(--line); background: var(--surface); }
.rail-section { padding: 13px; border-bottom: 1px solid var(--line); }
.rail-section h1, .rail-section h2 { margin-bottom: 10px; color: var(--muted); }
.stack { display: grid; gap: 9px; }
.attach summary { cursor: pointer; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; font-size: 10px; }
.attach[open] summary { margin-bottom: 11px; color: var(--text); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; }
.text-button { border: 0; background: transparent; padding: 0; min-height: auto; }
.run-list { display: grid; margin: 0 -13px; }
.run-list.empty { padding: 4px 13px 8px; color: var(--faint); font-family: var(--mono); }
.run-row { display: grid; grid-template-columns: 10px minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 8px 13px; border: 0; border-top: 1px solid var(--line); text-align: left; background: transparent; text-transform: none; letter-spacing: 0; font-weight: 400; }
.run-row:last-child { border-bottom: 1px solid var(--line); }
.run-row.selected { background: var(--surface-2); box-shadow: inset 2px 0 var(--accent); }
.run-row .id { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); }
.run-row .target { color: var(--muted); }
.run-status { width: 6px; height: 6px; background: var(--warn); }
.run-status.cancelled, .run-status.failed { background: var(--danger); }
.run-status.completed, .run-status.succeeded { background: var(--accent); }
.settings { display: grid; gap: 9px; }
.check-row { display: flex; align-items: center; gap: 7px; }
.check-row input { width: auto; accent-color: var(--accent); }

.workspace { min-width: 0; }
.empty-state { max-width: 560px; padding: 72px 38px; }
.empty-state.compact { padding: 36px 22px; }
.empty-state h2 { margin: 8px 0; font-size: 20px; text-transform: none; letter-spacing: -.02em; }
.empty-state p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--accent); font: 10px var(--mono); letter-spacing: .12em; }
.issue-header { display: grid; grid-template-columns: 1fr auto; gap: 24px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.issue-header .primary { min-width: 0; }
.issue-header h2 { font-size: 17px; text-transform: none; letter-spacing: -.01em; }
.issue-meta, .run-meta { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 5px; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.toolbar { padding: 8px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
.inline-form { display: flex; align-items: end; gap: 8px; }
.inline-form label { min-width: 220px; }

.run-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.run-titlebar h2 { font: 13px var(--mono); text-transform: none; letter-spacing: 0; }
.timeline { display: grid; grid-template-columns: repeat(9, minmax(74px, 1fr)); border-bottom: 1px solid var(--line); overflow-x: auto; }
.stage { position: relative; min-width: 96px; padding: 10px 9px 12px; border-right: 1px solid var(--line); color: var(--faint); }
.stage:last-child { border-right: 0; }
.stage .checkpoint { display: block; margin-bottom: 7px; font: 9px var(--mono); }
.stage .stage-name { display: block; min-height: 30px; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.stage .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
.stage.complete { color: var(--accent); }
.stage.complete .bar { background: var(--accent); }
.stage.next { color: var(--warn); background: #15130d; }
.stage.next .bar { background: var(--warn); }
.stage.queued { color: var(--muted); }
.stage.halted { color: var(--danger); }
.stage.halted .bar { background: #5e3030; }

.data-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr); }
.column { min-width: 0; border-right: 1px solid var(--line); }
.column:last-child { border-right: 0; }
.panel { border-bottom: 1px solid var(--line); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
.panel-heading .count { color: var(--faint); font: 10px var(--mono); }
.panel-body { padding: 11px 12px; }
.panel-body.flush { padding: 0; }
.empty-inline { padding: 14px 12px; color: var(--faint); font-family: var(--mono); }
.api-limit { padding: 7px 12px; color: var(--muted); border-bottom: 1px solid var(--line); font: 10px var(--mono); background: #0a0c0c; }

table { width: 100%; border-collapse: collapse; table-layout: fixed; }
th, td { padding: 7px 9px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { color: var(--faint); background: #0a0c0c; font-size: 9px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
td { font-family: var(--mono); font-size: 10px; }
tr:last-child td { border-bottom: 0; }
.digest { color: var(--muted); }
.integrity { color: var(--accent); }
.artifact-group + .artifact-group { border-top: 1px solid var(--line); }
.artifact-group h3 { display: flex; justify-content: space-between; padding: 7px 12px; color: var(--muted); background: #0a0c0c; }
.kv { display: grid; grid-template-columns: 132px minmax(0,1fr); border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv dt, .kv dd { margin: 0; padding: 7px 9px; }
.kv dt { color: var(--faint); text-transform: uppercase; letter-spacing: .05em; font-size: 9px; }
.kv dd { border-left: 1px solid var(--line); font-family: var(--mono); overflow-wrap: anywhere; }
.approval { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.approval:last-child { border-bottom: 0; }
.approval-head { display: flex; justify-content: space-between; gap: 10px; }
.decision.approved, .decision.accepted { color: var(--accent); }
.decision.rejected, .decision.denied { color: var(--danger); }
.approval p { margin-top: 5px; color: var(--muted); }
.approval-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.approval-form .wide { grid-column: 1 / -1; }
.cost-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 12px; border-bottom: 1px solid var(--line); }
.cost-total strong { font: 22px var(--mono); font-weight: 500; }
.lesson { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.lesson:last-child { border-bottom: 0; }
.lesson .scope { color: var(--text); }
.lesson .conditions { margin-top: 6px; color: var(--muted); }
.capture-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.capture-form .wide { grid-column: 1 / -1; }

@media (max-width: 980px) {
  .shell { grid-template-columns: 230px minmax(0, 1fr); }
  .data-grid { grid-template-columns: 1fr; }
  .column { border-right: 0; }
}
@media (max-width: 720px) {
  .shell-header { position: static; height: auto; min-height: 42px; flex-wrap: wrap; gap: 6px 10px; padding: 8px 12px; }
  .wordmark { min-width: 0; flex-wrap: wrap; gap: 6px; }
  .wordmark small, .header-link, .connection .mono, #connection-label { display: none; }
  .connection { margin-left: auto; }
  .shell { display: block; }
  .rail { border-right: 0; }
  .issue-header { grid-template-columns: 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .approval-form, .capture-form { grid-template-columns: 1fr; }
  .approval-form .wide, .capture-form .wide { grid-column: auto; }
}
}
