.d3-case-workspace {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.d3-case-workspace[hidden] {
  display: none;
}

.d4-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  align-items: start;
  gap: 14px;
}

.d4-workspace-column,
.d4-operations-rail {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.d4-rail-panel {
  padding: 14px;
}

.d4-rail-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.d4-rail-heading small,
.d4-provider-group > strong,
.d4-build-name {
  color: var(--accent);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.d4-rail-heading h2 {
  margin: 4px 0 0;
  font-size: 14px;
}

.d4-rail-heading > span,
.d4-model-status,
.d4-build-status {
  padding: 4px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  background: #0b1018;
  font-size: 7px;
  font-weight: 850;
  white-space: nowrap;
}

.d4-rail-panel > p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.d4-model-groups,
.d4-build-history,
.d4-active-state,
.d4-draft-changes {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.d4-provider-group {
  display: grid;
  gap: 7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.d4-provider-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.d4-provider-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.d4-provider-heading > strong {
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.d4-provider-heading > small {
  color: var(--muted);
  font-size: 8px;
}

.d4-provider-model-list {
  display: grid;
  gap: 8px;
}

.d4-profile-version {
  display: grid;
  gap: 5px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 9px;
}

.d4-profile-version select {
  width: 100%;
}

.d4-provider-selectors {
  display: grid;
  gap: 8px;
  margin: 8px 0;
}

.d4-provider-selectors .d4-profile-version {
  margin: 0;
}

.d3-semantic-containers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.d3-semantic-container {
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #090d13;
  overflow: hidden;
}

.d3-semantic-container > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  cursor: pointer;
  list-style: none;
}

.d3-semantic-container > summary::-webkit-details-marker {
  display: none;
}

.d3-semantic-container[open] > summary {
  color: var(--accent);
  background: rgba(183, 255, 61, 0.06);
  border-bottom: 1px solid rgba(183, 255, 61, 0.25);
}

.d3-semantic-container > summary span,
.d3-semantic-container > summary strong,
.d3-semantic-container > summary small {
  display: block;
}

.d3-semantic-container > summary small,
.d3-semantic-container > summary em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.d3-semantic-container-body {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.d3-semantic-subcategory,
.d3-semantic-subcategory > div {
  display: grid;
  gap: 7px;
}

.d3-semantic-subcategory > header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.d3-semantic-tag {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  background: #070b10;
}

.d3-semantic-tag.is-selected {
  border-color: rgba(183, 255, 61, 0.55);
}

.d3-semantic-tag.is-unselected {
  opacity: 0.68;
}

.d3-semantic-tag > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 8px;
  align-items: center;
}

.d3-semantic-tag > header select {
  width: 112px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 26px 6px 9px;
  border-radius: 7px;
  font-size: 10px;
  line-height: 1.2;
}

.d3-semantic-tag > header label {
  display: flex;
  gap: 7px;
  align-items: center;
}

.d3-semantic-tag > header label span,
.d3-semantic-tag > header label strong,
.d3-semantic-tag > header label small {
  display: block;
}

.d3-semantic-tag > header small,
.d3-semantic-rules,
.d3-direct-intent {
  color: var(--muted);
}

.d3-semantic-rules {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.d3-semantic-rules li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 5px;
  font-size: 9px;
}

.d3-semantic-rules li span {
  color: var(--accent);
}

.d3-semantic-rules p,
.d3-direct-intent > p {
  margin: 0;
}

.d3-direct-intent,
.d3-direct-intent > div {
  display: grid;
  gap: 7px;
}

.d3-direct-intent article {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 9px;
}

.d3-direct-intent article span {
  text-align: right;
}

.d3-semantic-containers.is-f2c-r1 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.f2c-r1-debug-structure > summary {
  cursor: default;
}

.f2c-r1-debug-group {
  display: grid;
  gap: 7px;
}

.f2c-r1-debug-group > header,
.f2c-r1-debug-tag > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.f2c-r1-debug-group > header {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.f2c-r1-debug-tag {
  border: 1px solid rgba(183, 255, 61, .35);
  border-radius: 9px;
  padding: 9px;
  background: #070b10;
}

.f2c-r1-debug-tag > header strong {
  color: #eff5fc;
  font-size: 10px;
}

.f2c-r1-debug-tag > header span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
}

.f2c-r1-debug-tag > p {
  margin: 7px 0 0;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  color: #aab8ca;
  font-size: 9px;
  line-height: 1.45;
}

.f2c-r1-debug-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

@media (max-width: 1200px) {
  .d3-semantic-containers.is-f2c-r1 { grid-template-columns: 1fr; }
}

.d4-model-card,
.d4-build-card,
.d4-pointer-card,
.d4-draft-change,
.d4-empty-state {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0a0e14;
}

.d4-model-card.is-current,
.d4-build-card.is-current,
.d4-pointer-card.is-current {
  border-color: rgba(199, 255, 89, .45);
  box-shadow: inset 0 0 0 1px rgba(199, 255, 89, .12);
}

.d4-model-card header,
.d4-build-card header,
.d4-pointer-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.d4-model-card strong,
.d4-model-card small,
.d4-build-card strong,
.d4-build-card small,
.d4-pointer-card strong,
.d4-pointer-card small,
.d4-draft-change strong,
.d4-draft-change small,
.d4-empty-state strong,
.d4-empty-state small {
  display: block;
}

.d4-model-card strong,
.d4-build-card strong,
.d4-pointer-card strong,
.d4-draft-change strong,
.d4-empty-state strong {
  font-size: 10px;
}

.d4-model-card small,
.d4-build-card small,
.d4-pointer-card small,
.d4-draft-change small,
.d4-empty-state small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.45;
  word-break: break-word;
}

.d4-pointer-card .d4-readiness-error {
  color: #ff9e9e;
}

.d4-model-statuses,
.d4-build-statuses {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 4px;
}

.d4-build-statuses {
  align-items: flex-end;
  flex-direction: column;
}

.d4-model-status.is-active,
.d4-build-status.is-active {
  color: var(--accent);
  border-color: rgba(199, 255, 89, .45);
}

.d4-build-card .d4-build-status,
.d5-archive-pill {
  box-sizing: border-box;
  width: 108px;
  min-height: 24px;
  text-align: center;
}

.d5-archive-pill {
  padding: 4px 7px;
  border: 1px solid rgba(255, 178, 111, .36);
  border-radius: 999px;
  color: #ffbf87;
  background: #0b1018;
  cursor: pointer;
  font-size: 7px;
  font-weight: 850;
}

.d5-archive-pill:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.d4-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 9px;
}

.d4-card-actions button,
.d4-primary-action,
.d4-confirm-actions button {
  min-height: 31px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: #111722;
  cursor: pointer;
  font-size: 8px;
  font-weight: 850;
}

.d4-card-actions button:disabled,
.d4-primary-action:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.d4-card-actions button.is-current {
  color: var(--accent);
  border-color: rgba(199, 255, 89, .4);
}

.d4-model-card details,
.d4-build-card details {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.d4-model-card summary,
.d4-build-card summary {
  padding-top: 8px;
  color: #a9b7c9;
  cursor: pointer;
  font-size: 8px;
  font-weight: 750;
}

.d4-system-details,
.d4-build-details {
  max-height: 220px;
  overflow: auto;
  margin: 7px 0 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #06090d;
  font-size: 7px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.d4-build-name {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.d4-build-name span {
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

#d4-build-name {
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #090d13;
  font-size: 9px;
}

.d4-primary-action {
  width: 100%;
  margin-top: 8px;
  min-height: 38px;
  color: #0b1005;
  border-color: var(--accent);
  background: var(--accent);
  font-size: 9px;
}

.d4-help {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 7px;
  line-height: 1.5;
}

.d5-discard-action,
.d5-unarchive-action {
  width: 100%;
  min-height: 32px;
  margin-top: 8px;
  border: 1px solid rgba(255, 159, 159, .38);
  border-radius: 7px;
  color: #ffb1b1;
  background: #111722;
  cursor: pointer;
  font-size: 8px;
  font-weight: 850;
}

.d5-discard-action:disabled {
  cursor: not-allowed;
  opacity: .36;
}

.d5-unarchive-action {
  color: #b8d0ff;
  border-color: rgba(121, 169, 255, .35);
}

.d4-draft-change ul {
  margin: 8px 0 0;
  padding-left: 15px;
  color: #c2cbd7;
  font-size: 8px;
  line-height: 1.5;
}

.d5-history-search-label {
  display: block;
  margin-top: 12px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.d5-history-search {
  box-sizing: border-box;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #090d13;
  font-size: 9px;
}

.d5-history-group {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.d5-history-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  color: #c5cfdd;
  cursor: pointer;
  font-size: 9px;
  font-weight: 800;
}

.d5-history-group > summary > span:last-child {
  min-width: 24px;
  padding: 3px 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  font-size: 7px;
}

.d5-search-empty {
  margin-top: 9px;
  padding: 9px;
  border: 1px solid rgba(255, 178, 111, .3);
  border-radius: 8px;
  color: #ffbf87;
  font-size: 8px;
}

.d4-build-card.is-archived {
  border-style: dashed;
}

.d4-build-card.is-legacy {
  border-color: rgba(121, 169, 255, .28);
}

.d4-build-card.is-quarantined {
  border-color: rgba(255, 122, 122, .48);
}

.d5-quarantine {
  margin-top: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 122, 122, .35);
  border-radius: 7px;
  color: #ffadad;
  background: rgba(255, 80, 80, .035);
}

.d5-quarantine strong,
.d5-quarantine small {
  display: block;
}

.d5-quarantine strong {
  font-size: 8px;
}

.d5-quarantine small {
  margin-top: 4px;
}

.d5-legacy-evidence {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 5px 8px;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #06090d;
  font-size: 7px;
}

.d5-legacy-evidence span {
  color: var(--muted);
}

.d5-legacy-evidence strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d4-node-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.d4-node-labels span {
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: #bdc9d8;
  font-size: 7px;
}

.d4-confirm-dialog {
  width: min(430px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: #10151e;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
}

.d4-confirm-dialog::backdrop {
  background: rgba(2, 4, 7, .78);
}

.d4-confirm-dialog form {
  padding: 20px;
}

.d4-confirm-dialog form > small {
  color: var(--accent);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.d4-confirm-dialog h2 {
  margin: 6px 0 0;
  font-size: 16px;
}

.d4-confirm-dialog p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.d4-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 18px;
}

#d4-confirm-action {
  color: #0b1005;
  border-color: var(--accent);
  background: var(--accent);
}

.d6-node-dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #3a4658;
  border-radius: 15px;
  color: var(--text);
  background: #0f141d;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .72);
}

.d6-node-dialog::backdrop {
  background: rgba(2, 4, 7, .82);
}

.d6-node-dialog form {
  display: grid;
  max-height: min(820px, calc(100vh - 28px));
  grid-template-rows: auto auto minmax(0, 1fr);
}

.d6-node-dialog-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.d6-node-dialog-header small {
  color: #8fbaff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.d6-node-dialog-header h2 {
  margin: 6px 0 0;
  font-size: 17px;
}

.d6-node-dialog-header button {
  min-width: 70px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--text);
  background: #121924;
  cursor: pointer;
  font-size: 9px;
  font-weight: 850;
}

.d6-node-dialog-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
  background: #0a0f16;
}

.d6-node-dialog-summary > span:last-child {
  color: var(--muted);
  font-size: 9px;
}

.d6-node-dialog-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
  padding: 16px 20px 20px;
  overflow: auto;
}

.d6-node-detail-section {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #090d13;
}

.d6-node-detail-section h3 {
  margin: 0;
  color: #b8d0ff;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.d6-node-detail-section p,
.d6-node-detail-section pre {
  margin: 9px 0 0;
  color: #c6d0dd;
  font-size: 9px;
  line-height: 1.5;
}

.d6-node-detail-section pre {
  max-height: 260px;
  padding: 10px;
  overflow: auto;
  border: 1px solid #232c39;
  border-radius: 7px;
  background: #05080c;
  white-space: pre-wrap;
  word-break: break-word;
}

.d6-node-detail-section .d6-node-detail-empty {
  color: #778392;
}

.d3-case-header,
.d3-input-section,
.d3-nodes-section,
.d3-prompt-preview-section,
.d3-output-section,
.d3-phase-boundary {
  padding: 18px;
}

.d3-case-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
}

.d3-case-header small,
.d3-section-heading small,
.d3-status-card > span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.d3-case-header h2,
.d3-section-heading h2 {
  margin: 5px 0 0;
  font-size: 16px;
}

.d3-case-header p,
.d3-input-group > p,
.d3-phase-boundary p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.d3-case-buttons {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #090c11;
}

.d3-case-button {
  min-width: 110px;
  padding: 10px 14px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.d3-case-button.is-active {
  color: #0a1004;
  background: var(--accent);
}

.d3-status-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.d3-status-card {
  min-width: 0;
  padding: 13px 15px;
}

.d3-status-card strong,
.d3-status-card small {
  display: block;
}

.d3-status-card strong {
  margin-top: 5px;
  font-size: 13px;
}

.d3-status-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.d3-run-button,
.d3-node-action,
.d3-open-library,
.d3-use-version,
.d3-remove-image {
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #111722;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.d3-run-button:disabled,
.d3-use-version:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.d3-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.d3-section-heading > span {
  color: var(--muted);
  font-size: 9px;
}

.d3-run-button {
  min-width: 110px;
  padding: 11px 22px;
  color: #0b1005;
  border-color: var(--accent);
  background: var(--accent);
}

.d3-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 15px;
}

.d3-input-groups {
  display: grid;
  gap: 12px;
  margin-top: 15px;
}

.d3-input-group {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 10, 15, .52);
}

.d3-input-group-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.d3-input-group-heading small,
.d3-input-group-heading h3 {
  display: block;
}

.d3-input-group-heading small {
  color: #8da0b7;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.d3-input-group-heading h3 {
  margin: 4px 0 0;
  font-size: 13px;
}

.d3-input-group-heading > span {
  color: var(--muted);
  font-size: 9px;
}

.d3-user-inputs {
  margin-top: 12px;
}

.d3-user-input-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.d3-user-category {
  min-width: 0;
  padding: 12px;
  border: 1px solid #263241;
  border-radius: 10px;
  background: rgba(9, 13, 19, .74);
}

.d3-user-category > header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.d3-user-category > header small {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #344253;
  border-radius: 6px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 850;
}

.d3-user-category > header h4 {
  margin: 0;
  font-size: 11px;
}

.d3-user-category[data-d3-user-category="materials"] {
  grid-column: 1 / -1;
}

.d3-user-category .d3-user-input-grid + .d3-user-input-grid {
  margin-top: 10px;
}

.d3-user-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.d3-user-input-grid.is-single-control {
  grid-template-columns: minmax(0, 1fr);
}

.d3-user-input-grid[data-d3-user-layout-group="grids"] {
  align-items: stretch;
}

.d3-user-input-grid[data-d3-user-layout-group="grids"] .d3-user-field--grid {
  height: 100%;
  align-content: start;
}

.d3-output-settings {
  margin-top: 12px;
}

.d3-output-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.d3-output-setting {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(199, 255, 89, .28);
  border-radius: 9px;
  background: #090d13;
}

.d3-output-setting > span,
.d3-output-settings-evidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.d3-output-setting b {
  color: #d7e1ec;
  font-size: 10px;
}

.d3-output-setting em {
  color: var(--accent);
  font-size: 8px;
  font-style: normal;
  font-weight: 750;
  text-transform: uppercase;
}

.d3-output-setting select {
  width: 100%;
  min-height: 35px;
  padding: 7px 9px;
  border: 1px solid #354354;
  border-radius: 7px;
  color: var(--text);
  background: #070a0f;
}

.d3-output-settings-evidence {
  margin-top: 8px;
  padding: 0 3px;
  color: var(--muted);
  font-size: 8px;
}

.d3-user-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  padding: 11px;
  border: 1px solid #273341;
  border-radius: 9px;
  background: #090d13;
}

.d3-user-field > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #d7e1ec;
  font-size: 10px;
  font-weight: 750;
}

.d3-user-field > span b {
  font: inherit;
}

.d3-user-field em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
  text-transform: uppercase;
}

.d3-user-field em.is-missing,
.d3-user-field em.is-invalid {
  color: #ff9e9e;
}

.d3-user-field em.is-complete {
  color: var(--accent);
}

.d3-user-field.is-required-missing,
.d3-user-field.is-invalid {
  border-color: rgba(255, 92, 101, .75);
  box-shadow: inset 0 0 0 1px rgba(255, 92, 101, .12);
}

.d3-user-field.is-required-missing select,
.d3-user-field.is-invalid select,
.d3-user-field.is-required-missing .d3-user-multi-menu > summary,
.d3-user-field.is-invalid .d3-user-multi-menu > summary {
  border-color: rgba(255, 92, 101, .72);
}

.d3-user-field.is-complete {
  border-color: rgba(199, 255, 89, .28);
}

.d3-user-field select {
  width: 100%;
  min-height: 35px;
  padding: 7px 9px;
  border: 1px solid #354354;
  border-radius: 7px;
  color: var(--text);
  background: #070a0f;
}

.d3-user-field select[multiple] {
  min-height: 82px;
}

.d3-user-field small {
  color: var(--muted);
  font-size: 8px;
}

.d3-selection-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid #273341;
  border-radius: 7px;
  background: #070a0f;
}

.d3-selection-groups {
  display: grid;
  gap: 10px;
  padding: 9px;
  border: 1px solid #273341;
  border-radius: 8px;
  background: #070a0f;
}

.d3-user-field.is-required-missing .d3-selection-groups,
.d3-user-field.is-invalid .d3-selection-groups {
  border-color: rgba(255, 92, 101, .72);
}

.d3-selection-category + .d3-selection-category {
  padding-top: 10px;
  border-top: 1px solid #202a36;
}

.d3-selection-category > strong {
  display: block;
  margin-bottom: 7px;
  color: #8996a7;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.d3-selection-grid {
  display: grid;
  gap: 6px;
}

.d3-selection-grid.is-material-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.d3-selection-grid.is-color-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.d3-selection-option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid #344151;
  border-radius: 7px;
  color: #c4ceda;
  background: #0b1017;
  cursor: pointer;
  font-size: 8px;
  line-height: 1.25;
  text-align: center;
}

.is-color-grid .d3-selection-option {
  min-height: 48px;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.d3-selection-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.d3-selection-option:hover,
.d3-selection-option:focus-within {
  border-color: #708098;
}

.d3-selection-option.is-selected {
  border-color: var(--accent);
  color: #efffd0;
  background: rgba(199, 255, 89, .1);
  box-shadow: inset 0 0 0 1px rgba(199, 255, 89, .08);
}

.d3-selection-option.is-limit-blocked {
  cursor: not-allowed;
  opacity: .34;
}

.d3-color-swatch {
  width: 19px;
  height: 19px;
  flex: none;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 5px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .24);
}

.d3-color-swatch--0 { background: #fff; }
.d3-color-swatch--1 { background: #f7f3ea; }
.d3-color-swatch--2 { background: #efe3c6; }
.d3-color-swatch--3 { background: #d8c6a5; }
.d3-color-swatch--4 { background: #c8b68f; }
.d3-color-swatch--5 { background: #b8aea0; }
.d3-color-swatch--6 { background: #8a7a68; }
.d3-color-swatch--7 { background: #c49a6c; }
.d3-color-swatch--8 { background: #b9824d; }
.d3-color-swatch--9 { background: #8a5a3b; }
.d3-color-swatch--10 { background: #4a2c1f; }
.d3-color-swatch--11 { background: #d1d1cc; }
.d3-color-swatch--12 { background: #a8a39b; }
.d3-color-swatch--13 { background: #8c8c84; }
.d3-color-swatch--14 { background: #3f4142; }
.d3-color-swatch--15 { background: #0e0e0e; }
.d3-color-swatch--16 { background: #6f733d; }
.d3-color-swatch--17 { background: #9aa487; }
.d3-color-swatch--18 { background: #254f3a; }
.d3-color-swatch--19 { background: #b65a3c; }
.d3-color-swatch--20 { background: #d8a0a3; }
.d3-color-swatch--21 { background: #c79a24; }
.d3-color-swatch--22 { background: #287c78; }
.d3-color-swatch--23 { background: #1d335c; }
.d3-color-swatch--24 { background: #5a1f2d; }

.d3-user-multi-menu {
  position: relative;
}

.d3-user-multi-menu > summary {
  display: flex;
  min-height: 35px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #354354;
  border-radius: 7px;
  color: var(--text);
  background: #070a0f;
  cursor: pointer;
  font-size: 9px;
  list-style: none;
}

.d3-user-multi-menu > summary::-webkit-details-marker {
  display: none;
}

.d3-user-menu-chevron {
  width: 7px;
  height: 7px;
  flex: none;
  border-right: 2px solid #c7d1dd;
  border-bottom: 2px solid #c7d1dd;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .15s ease;
}

.d3-user-multi-menu[open] .d3-user-menu-chevron {
  transform: translateY(2px) rotate(225deg);
}

.d3-user-menu-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  max-height: 190px;
  margin-top: 6px;
  padding: 7px;
  overflow: auto;
  border: 1px solid #354354;
  border-radius: 7px;
  background: #070a0f;
}

.d3-user-menu-limit {
  grid-column: 1 / -1;
  padding: 2px 2px 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.d3-user-menu-option {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  padding: 7px;
  border: 1px solid #283443;
  border-radius: 6px;
  color: #bdc8d6;
  background: #0b1017;
  cursor: pointer;
  font-size: 8px;
}

.d3-user-menu-option input {
  width: 13px;
  height: 13px;
  flex: none;
  accent-color: var(--accent);
}

.d3-user-menu-option.is-selected {
  border-color: rgba(199, 255, 89, .55);
  color: #efffd0;
}

.d3-user-menu-option.is-limit-blocked {
  cursor: not-allowed;
  opacity: .34;
}

.d3-no-user-inputs {
  margin: 0;
  padding: 13px 14px;
  border: 1px dashed #323c49;
  border-radius: 9px;
  color: #909cab;
  background: #090d13;
  font-size: 10px;
}

@media (max-width: 760px) {
  .d3-user-input-stack,
  .d3-output-settings-grid {
    grid-template-columns: 1fr;
  }

  .d3-user-category[data-d3-user-category="materials"] {
    grid-column: auto;
  }

  .d3-user-input-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .d3-selection-grid.is-material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .d3-selection-grid.is-color-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.d3-upload-card {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px dashed #32778b;
  border-radius: 12px;
  background: #080b10;
}

.d3-upload-card.is-required-missing {
  border-color: rgba(255, 92, 101, .78);
  box-shadow: inset 0 0 0 1px rgba(255, 92, 101, .12);
}

.d3-upload-card.is-complete {
  border-color: rgba(199, 255, 89, .42);
}

.d3-upload-card > button.d3-upload-target {
  width: 100%;
  min-height: 230px;
  padding: 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.d3-upload-empty {
  display: grid;
  min-height: 194px;
  place-items: center;
  align-content: center;
}

.d3-upload-empty em {
  margin-top: 8px;
  color: #ff9e9e;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.d3-upload-plus {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #3b8ba2;
  border-radius: 50%;
  color: #9deaff;
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
}

.d3-upload-empty strong,
.d3-upload-empty small {
  display: block;
}

.d3-upload-empty strong {
  margin-top: 12px;
  font-size: 11px;
}

.d3-upload-empty small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.d3-upload-preview {
  display: grid;
  min-height: 194px;
  grid-template-rows: minmax(150px, 1fr) auto;
  gap: 10px;
}

.d3-upload-preview img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  border-radius: 8px;
  background: #05070a;
}

.d3-upload-preview span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d3-remove-image {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 9px;
  color: #ffb2b2;
  border-color: rgba(255, 110, 110, .4);
  background: rgba(10, 13, 18, .92);
}

.d3-notice {
  padding: 12px 15px;
  color: #bfe5ff;
  border-color: rgba(121, 169, 255, .35);
  font-size: 11px;
}

.d3-notice.is-error {
  color: #ffb0b0;
  border-color: rgba(255, 100, 100, .42);
}

.d3-notice.is-success {
  color: var(--accent);
  border-color: rgba(199, 255, 89, .4);
}

.d3-node-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: start;
  gap: 12px;
  margin-top: 16px;
}

.d3-library-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 28px;
  border: 1px dashed #334255;
  border-radius: 12px;
  color: #8fa0b7;
  background: #0b0f15;
  text-align: center;
}

.d3-library-empty strong {
  color: #eef4ff;
  font-size: 14px;
}

.d3-library-empty span {
  max-width: 620px;
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.6;
}

.d3-node {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #344053;
  border-top: 2px solid #7b9fd1;
  border-radius: 12px;
  background: #111620;
}

.d3-node.is-capability {
  border-top-color: var(--accent);
}

.d3-node.is-system {
  border-top-color: #7b9fd1;
}

.d3-node.is-experimental {
  border-color: rgba(240, 169, 67, .52);
  border-top-color: #f0a943;
  background: linear-gradient(180deg, rgba(240, 169, 67, .055), transparent 92px), #111620;
}

.d3-node-group-divider {
  display: flex;
  grid-column: 1 / -1;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 4px;
  padding-top: 15px;
  border-top: 1px solid #344053;
}

.d3-node-group-divider strong,
.d3-node-group-divider span {
  display: block;
}

.d3-node-group-divider strong {
  color: #b8d0ff;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.d3-node-group-divider span {
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.d3-node-group-divider.d3-experimental-boundary {
  border-top-color: rgba(240, 169, 67, .42);
}

.d3-node-group-divider.d3-experimental-boundary strong {
  color: #f0b962;
}

.d3-node.is-edited {
  box-shadow: inset 0 0 0 1px rgba(199, 255, 89, .28);
}

.d3-node.is-run-running {
  box-shadow: inset 0 0 0 1px rgba(80, 157, 255, .36);
}

.d3-node.is-run-pass {
  box-shadow: inset 0 0 0 1px rgba(92, 220, 135, .28);
}

.d3-node.is-run-fail {
  box-shadow: inset 0 0 0 1px rgba(255, 92, 101, .42);
}

.d3-node.is-run-skipped {
  opacity: .82;
}

.d3-node-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.d3-node-header small,
.d3-node-header h3 {
  display: block;
}

.d3-node-header small {
  color: #9ca9bb;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.d3-node-header h3 {
  margin: 5px 0 0;
  font-size: 13px;
}

.d6-node-status {
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid #485364;
  border-radius: 999px;
  color: #b3bdc9;
  background: #151a22;
  cursor: default;
  font: inherit;
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .045em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.d6-node-status[data-d6-node-details] {
  cursor: pointer;
}

.d6-node-status.is-running {
  color: #a9d1ff;
  border-color: rgba(80, 157, 255, .62);
  background: rgba(47, 116, 209, .16);
}

.d6-node-status.is-pass {
  color: #aef5c3;
  border-color: rgba(92, 220, 135, .55);
  background: rgba(45, 143, 78, .15);
}

.d6-node-status.is-fail {
  color: #ffb0b4;
  border-color: rgba(255, 92, 101, .62);
  background: rgba(177, 45, 52, .18);
}

.d6-node-status.is-skipped {
  color: #7d8794;
  border-color: #303742;
  background: #090c11;
}

.d6-node-status.is-not-run {
  color: #a7b0bb;
  border-color: #444d59;
  background: #11161d;
}

.d3-node-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 6px;
}

.d3-version-use-row {
  margin-top: 8px;
}

.d3-version-badge {
  padding: 5px 8px;
  border: 1px solid rgba(121, 169, 255, .35);
  border-radius: 999px;
  color: #b8d0ff;
  background: #0b1018;
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.d3-node.is-edited .d3-version-badge {
  color: var(--accent);
  border-color: rgba(199, 255, 89, .42);
}

.d3-node-action {
  padding: 5px 8px;
  color: var(--accent);
  border-color: rgba(199, 255, 89, .35);
}

.d3-node-body {
  padding: 14px;
}

.d3-node-purpose {
  min-height: 46px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.d3-profile-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0e14;
}

.d3-profile-line span {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.d3-profile-line strong {
  font-size: 9px;
}

.d3-node-settings {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(199, 255, 89, .28);
  border-radius: 9px;
  background: rgba(199, 255, 89, .035);
}

.d3-node-settings > small {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.d3-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: #dbe1e9;
  font-size: 10px;
}

.d3-toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.d3-node details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.d3-node summary {
  padding: 10px 0 0;
  color: #b9c3d1;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.d3-version-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.d3-version-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a0e14;
}

.d3-version-option.is-previewing {
  border-color: rgba(121, 169, 255, .5);
}

.d3-version-option.is-used {
  border-color: rgba(199, 255, 89, .42);
}

.d3-version-option button[data-d3-preview-version] {
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.d3-version-option strong,
.d3-version-option small {
  display: block;
}

.d3-version-option strong {
  font-size: 9px;
}

.d3-version-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
}

.d3-use-version {
  align-self: center;
  padding: 6px 8px;
  color: #b8d0ff;
}

.d3-version-preview {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #080b10;
  font-size: 8px;
  line-height: 1.45;
  word-break: break-word;
}

.d3-open-library {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  color: #a6c7ff;
}

.d3-run-evidence-body,
#d3-run-evidence-body {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

#d3-run-evidence-body article {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090d13;
}

#d3-run-evidence-body span,
#d3-run-evidence-body strong {
  display: block;
}

#d3-run-evidence-body span {
  color: var(--muted);
  font-size: 8px;
}

#d3-run-evidence-body strong {
  margin-top: 5px;
  font-size: 10px;
}

.d6-output-grid {
  display: grid;
  grid-template-columns: minmax(0, 680px);
  justify-content: center;
  margin-top: 16px;
}

.d6-result-node {
  width: 100%;
  border-top-color: var(--accent);
}

.d6-result-node .d3-node-purpose {
  min-height: 0;
}

.d6-result-box {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 220px;
  max-height: 400px;
  margin-top: 12px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(199, 255, 89, .24);
  border-radius: 10px;
  place-items: center;
  color: var(--muted);
  background: linear-gradient(145deg, rgba(199, 255, 89, .07), transparent 48%), #090d13;
  text-align: center;
}

.d6-result-empty-state {
  display: grid;
  justify-items: center;
}

.d6-result-placeholder-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid rgba(199, 255, 89, .28);
  border-radius: 14px;
  color: rgba(199, 255, 89, .72);
  background: rgba(199, 255, 89, .04);
}

.d6-result-placeholder-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.d6-result-box > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.d6-generated-result {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
}

.d6-generated-result img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.d6-result-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.d6-result-actions a {
  padding: 7px 12px;
  border: 1px solid rgba(199, 255, 89, .32);
  border-radius: 7px;
  color: var(--accent);
  background: rgba(199, 255, 89, .05);
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}

.d6-result-box.is-validated {
  border-color: rgba(199, 255, 89, .58);
}

.d6-result-box.is-running {
  border-color: rgba(80, 157, 255, .58);
  background: linear-gradient(145deg, rgba(80, 157, 255, .09), transparent 48%), #090d13;
}

.d6-result-box.is-failed {
  border-color: rgba(255, 92, 101, .58);
  background: linear-gradient(145deg, rgba(255, 92, 101, .08), transparent 48%), #090d13;
}

.d6-result-box strong,
.d6-result-box span {
  display: block;
}

.d6-result-box strong {
  color: #e7eef0;
  font-size: 12px;
}

.d6-result-box span {
  max-width: 420px;
  margin-top: 7px;
  font-size: 9px;
  line-height: 1.5;
}

.d6-result-diagnostics {
  margin-top: 10px;
  border-top: 1px solid var(--line);
}

.d6-result-diagnostics summary {
  padding-top: 10px;
  color: #b9c3d1;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.d6-result-diagnostics summary em {
  float: right;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.d6-result-diagnostics p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.d3-run-evidence {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(121, 169, 255, .28);
  border-radius: 10px;
  background: #080c12;
}

.d6-receipt-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.d6-receipt-heading small,
.d6-receipt-heading strong,
.d6-receipt-heading > span {
  display: block;
}

.d6-receipt-heading small {
  color: #9dbbdf;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.d6-receipt-heading strong {
  margin-top: 5px;
  font-size: 10px;
}

.d6-receipt-heading > span {
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.d3-phase-boundary summary {
  color: #b9c5d5;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 900px) {
  .d3-semantic-containers {
    grid-template-columns: 1fr;
  }
  .d4-main-layout {
    grid-template-columns: 1fr;
  }

  .d4-operations-rail {
    position: static;
  }

  .d3-case-header {
    align-items: stretch;
    flex-direction: column;
  }

  .d3-case-buttons {
    align-self: start;
  }

  .d3-status-row {
    grid-template-columns: 1fr 1fr;
  }

  .d3-input-grid,
  #d3-run-evidence-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .d6-node-dialog-body {
    grid-template-columns: 1fr;
  }

  .d3-status-row,
  .d3-node-grid {
    grid-template-columns: 1fr;
  }

  .d3-case-buttons {
    width: 100%;
  }

  .d3-case-button {
    min-width: 0;
    flex: 1;
  }

  .d6-result-box {
    height: 230px;
  }

  .d6-receipt-heading {
    flex-direction: column;
  }

  .d3-node-group-divider {
    align-items: start;
    flex-direction: column;
    gap: 5px;
  }

  .d3-node-group-divider span {
    text-align: left;
  }

  .d6-receipt-heading > span {
    text-align: left;
  }
}
.f2c-compact-operation {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.f2c-compact-operation > button { align-self: flex-start; }

.f2c-compact-operation h2 { margin: 4px 0 6px; }
.f2c-compact-operation p { margin: 0; color: #91a3bc; line-height: 1.35; }
.f2c-compact-operation > div { min-width: 0; }
.f2c-compact-operation h2 { font-size: 18px; line-height: 1.15; }
.f2c-compact-summary-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: 10px;
}
.f2c-compact-summary-row > strong { color: #dbe7f5; font-size: 9px; }
.f2c-compact-summary-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f2c-compact-summary-row > b {
  border: 1px solid #34465b;
  border-radius: 999px;
  padding: 2px 6px;
  color: #718198;
  font-size: 8px;
  white-space: nowrap;
}
.f2c-compact-summary-row > b.is-active { border-color: #76a83d; background: #142010; color: #b9ff45; }
.f2c-expanded-provider-summary {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090d13;
}
.f2c-expanded-provider-summary .f2c-compact-summary-row { margin-top: 0; }
.f2c-compact-operation button,
.f2c-debug-dialog-shell > header button {
  flex: 0 0 auto;
  min-width: 76px;
  border: 1px solid #4c6078;
  border-radius: 9px;
  background: #111923;
  color: #dce9f8;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

.f2c-compact-operation button:hover,
.f2c-debug-dialog-shell > header button:hover { border-color: #b9ff45; color: #b9ff45; }

.f2c-debug-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid #40536a;
  border-radius: 16px;
  background: #0c1118;
  color: #eef5ff;
  overflow: hidden;
}

.f2c-debug-dialog::backdrop { background: rgba(0, 0, 0, .76); backdrop-filter: blur(3px); }
.f2c-debug-dialog-shell { max-height: calc(100vh - 34px); overflow: auto; padding: 18px; }
.f2c-debug-dialog-shell > header {
  position: sticky;
  top: -18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: -18px -18px 18px;
  padding: 18px;
  border-bottom: 1px solid #2c3848;
  background: #101720;
}
.f2c-debug-dialog-shell > header h2 { margin: 4px 0 0; }
.f2c-debug-dialog .d4-rail-panel { margin-bottom: 14px; }
