.sx-workspaces {
  display: grid;
  gap: 42px;
  margin: 28px 0 46px;
}
.sx-workspace {
  border: 1px solid var(--line);
  background: var(--paper);
  overflow: hidden;
  min-width: 0;
}
.sx-workspace-head {
  padding: 25px 28px 22px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.sx-number {
  font:
    11px/1.4 ui-monospace,
    monospace;
  letter-spacing: 0.12em;
  color: var(--orange);
}
.sx-workspace-head h3 {
  font:
    500 clamp(23px, 2.3vw, 31px) / 1.2 Georgia,
    serif;
  margin: 10px 0;
}
.sx-workspace-head p {
  font-size: 17px;
  line-height: 1.7;
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}
.sx-workspace-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
}
.sx-figure-column {
  min-width: 0;
  padding: 25px 25px 22px;
}
.sx-figure {
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
}
.sx-figure svg {
  width: 100%;
  height: auto;
  display: block;
  touch-action: none;
  color: var(--fg);
  font-family: ui-monospace, monospace;
  min-height: 200px;
}
.sx-figure text,
.sx-secondary svg text {
  fill: var(--fg);
  font-size: 11px;
}
.sx-figure .sx-tick {
  font-size: 10px;
  fill: var(--muted);
}
.sx-figure .sx-axis {
  font-size: 11px;
  fill: var(--muted);
}
.sx-figure .sx-node {
  fill: var(--fg);
  font-size: 11px;
  font-weight: 700;
}
.sx-figure .sx-node-selected {
  fill: var(--paper);
  font-size: 11px;
  font-weight: 700;
}
.sx-figure .sx-point-label {
  font-size: 11px;
  fill: var(--fg);
  font-weight: 600;
}
.sx-figure [data-drag]:not([data-drag="none"]),
.sx-figure [data-node],
.sx-figure [data-sample],
.sx-figure [data-person],
.sx-figure [data-scene],
.sx-figure [data-object],
.sx-figure [data-side],
.sx-figure [data-panel],
.sx-figure [data-event] {
  cursor: pointer;
}
.sx-figure [data-drag]:not([data-drag="none"]) {
  cursor: grab;
}
.sx-figure [data-drag]:active {
  cursor: grabbing;
}
.sx-figure [tabindex]:focus-visible {
  outline: none;
  stroke: var(--orange);
  stroke-width: 4;
}
.sx-direct-hint {
  font-size: 12px !important;
  color: var(--muted);
  line-height: 1.5;
  margin: 10px 0 19px !important;
}
.sx-settings {
  padding: 25px 20px;
  background: var(--bg);
  border-left: 1px solid var(--line);
  min-width: 0;
}
.sx-settings-label {
  font:
    11px/1.4 ui-monospace,
    monospace;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.sx-control {
  display: block;
  margin: 0 0 20px;
  font-size: 12px;
  line-height: 1.5;
}
.sx-control > span {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  min-height: 24px;
}
.sx-control output {
  font:
    12px/1.6 ui-monospace,
    monospace;
  color: var(--orange);
  white-space: nowrap;
}
.sx-control input[type="range"] {
  width: 100%;
  height: 20px;
  accent-color: var(--orange);
  margin: 7px 0 0;
  cursor: pointer;
}
.sx-model {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
}
.sx-model b {
  font:
    10px/1.5 ui-monospace,
    monospace;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.sx-model p {
  font-size: 12px !important;
  line-height: 1.9;
  margin: 9px 0 !important;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.sx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 20px;
}
.sx-actions button,
.sx-extra-controls button {
  border: 1px solid var(--line);
  padding: 7px 10px;
  background: var(--paper);
  font-size: 11px;
  line-height: 1.5;
  border-radius: 2px;
  color: var(--fg);
  cursor: pointer;
}
.sx-actions button:hover,
.sx-extra-controls button:hover {
  border-color: var(--orange);
  color: var(--orange);
}
.sx-extra-controls p {
  font-size: 12px !important;
  line-height: 1.7;
  color: var(--muted);
}
.sx-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  margin-top: 16px;
}
.sx-metrics > div {
  padding: 17px 9px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.sx-metrics > div:first-child {
  padding-left: 0;
}
.sx-metrics > div:last-child {
  border-right: 0;
}
.sx-metrics span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  min-height: 35px;
}
.sx-metrics strong {
  display: block;
  font:
    500 clamp(19px, 2.1vw, 27px) / 1.4 ui-monospace,
    monospace;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}
.sx-metrics small {
  font:
    10px/1.5 ui-monospace,
    monospace;
  letter-spacing: 0;
  color: var(--muted);
}
.sx-results {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.8fr);
  gap: 30px;
  padding: 24px 28px;
  border-top: 1px solid var(--line);
}
.sx-table-wrap {
  max-height: 270px;
  overflow: auto;
  min-width: 0;
}
.sx-table-wrap:empty {
  display: none;
}
.sx-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font:
    11px/1.7 ui-monospace,
    monospace;
  color: var(--fg);
}
.sx-table-wrap th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
  padding: 7px 10px 7px 0;
  position: sticky;
  top: 0;
  background: var(--paper);
}
.sx-table-wrap td {
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid var(--line);
}
.sx-interpretation {
  padding-left: 20px;
  border-left: 2px solid var(--orange);
}
.sx-interpretation > span {
  font:
    10px/1.4 ui-monospace,
    monospace;
  color: var(--orange);
  letter-spacing: 0.1em;
}
.sx-interpretation p {
  font-size: 13px !important;
  line-height: 1.9;
  margin: 8px 0 0 !important;
}
.sx-detail {
  display: block;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 10px;
  overflow-wrap: anywhere;
}
.sx-coding-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-top: 18px;
}
.sx-coding-list > div {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.sx-coding-list p {
  font-size: 12px !important;
  line-height: 1.8;
  margin: 0 0 8px !important;
}
.sx-coding-list button {
  border: 1px solid var(--line);
  font:
    10px/1.5 ui-monospace,
    monospace;
  padding: 4px 9px;
  margin-right: 5px;
  border-radius: 0;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
}
.sx-coding-list button[aria-pressed="true"] {
  background: var(--fg);
  color: var(--paper);
  border-color: var(--fg);
}
.sx-sequence-chart {
  display: block;
  width: 100%;
  margin-top: 14px;
  background: var(--bg);
}
.sx-sequence-chart [data-progress] {
  cursor: pointer;
}
body.large .sx-workspace-head p {
  font-size: 24px;
}
body.large .sx-control,
body.large .sx-model p,
body.large .sx-interpretation p {
  font-size: 17px !important;
}
body.large .sx-figure text {
  font-size: 14px;
}
body.large .sx-metrics span {
  font-size: 14px;
}
body.large .sx-table-wrap table {
  font-size: 14px;
}
body.large .sx-coding-list p {
  font-size: 17px !important;
}
@media (max-width: 1000px) {
  .sx-workspace-body {
    grid-template-columns: minmax(0, 1fr) 235px;
  }
  .sx-figure-column {
    padding: 18px;
  }
  .sx-settings {
    padding: 20px 16px;
  }
  .sx-results {
    gap: 20px;
    padding: 20px;
  }
}
@media (max-width: 760px) {
  .sx-workspaces {
    gap: 26px;
  }
  .sx-workspace-head {
    padding: 20px;
  }
  .sx-workspace-head h3 {
    font-size: 25px;
  }
  .sx-workspace-head p {
    font-size: 15px;
  }
  .sx-workspace-body {
    display: block;
  }
  .sx-figure-column {
    padding: 14px;
  }
  .sx-figure svg {
    min-height: 0;
  }
  .sx-settings {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .sx-settings-label,
  .sx-model,
  .sx-actions,
  .sx-extra-controls {
    grid-column: 1/-1;
  }
  .sx-model {
    margin-top: 4px;
  }
  .sx-settings-label {
    margin-bottom: 16px;
  }
  .sx-results {
    display: block;
    padding: 18px;
  }
  .sx-interpretation {
    margin-top: 18px;
  }
  .sx-metrics > div {
    padding: 12px 6px;
  }
  .sx-metrics strong {
    font-size: 19px;
  }
  .sx-metrics span {
    font-size: 10px;
  }
  .sx-table-wrap {
    max-height: 220px;
  }
  .sx-figure .sx-axis,
  .sx-figure .sx-tick {
    font-size: 12px;
  }
}
@media (max-width: 390px) {
  .sx-workspace-head {
    padding: 16px;
  }
  .sx-settings {
    padding: 16px;
    gap: 0 12px;
  }
  .sx-control {
    font-size: 11px;
  }
  .sx-metrics strong {
    font-size: 17px;
  }
  .sx-metrics span {
    min-height: 48px;
  }
  .sx-actions button {
    font-size: 10px;
  }
}
@media print {
  .sx-workspaces {
    display: block;
  }
  .sx-workspace {
    break-inside: avoid;
    margin: 20px 0;
    box-shadow: none;
  }
  .sx-workspace-body {
    display: block;
  }
  .sx-settings,
  .sx-actions,
  .sx-direct-hint,
  .sx-extra-controls {
    display: none !important;
  }
  .sx-workspace-head {
    padding: 12px;
  }
  .sx-figure-column {
    padding: 12px;
  }
  .sx-figure {
    max-width: 650px;
    margin: auto;
  }
  .sx-figure svg {
    max-height: 250px;
  }
  .sx-metrics {
    margin-top: 8px;
  }
  .sx-results {
    padding: 12px;
    gap: 15px;
  }
  .sx-table-wrap {
    max-height: none;
    overflow: visible;
  }
  .sx-coding-list button {
    pointer-events: none;
  }
  .sx-workspace-head h3 {
    font-size: 20px;
  }
}

.sx-figure text,
.sx-secondary svg text {
  pointer-events: none;
}
