:root {
  color-scheme: dark;
  --bg: #111111;
  --panel: #181818;
  --panel-raised: #202020;
  --panel-soft: #242424;
  --border: #303030;
  --border-strong: #3c3c3c;
  --text: #f2f2f0;
  --text-soft: #b4b3af;
  --muted: #777773;
  --orange: #f47b35;
  --orange-bright: #ff914d;
  --orange-soft: rgba(244, 123, 53, 0.13);
  --green: #70b98b;
  --red: #e56767;
  --yellow: #dfb35d;
  --mono: 'SFMono-Regular', 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

button,
select,
textarea {
  font: inherit;
}

button,
select {
  color: inherit;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: -2px;
}

.app-shell {
  height: 100%;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
}

.topbar {
  z-index: 10;
  display: grid;
  grid-template-columns: 240px minmax(220px, 1fr) auto;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: #171717;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.brand {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  color: inherit;
  text-decoration: none;
}

.brand img {
  border-radius: 7px;
  box-shadow: 0 0 20px rgba(244, 123, 53, 0.18);
}

.brand-copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.brand-copy strong {
  letter-spacing: 0.14em;
  font-size: 13px;
}

.brand-copy span {
  color: var(--muted);
  font-size: 11px;
}

.topbar-center {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 12px;
}

.file-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}

.unsaved {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: transparent;
}

.unsaved.visible {
  background: var(--text-soft);
}

.topbar-actions {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
}

.toolchain-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(223, 179, 93, 0.1);
}

.toolchain-status.ok .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(112, 185, 139, 0.1);
}

.toolchain-status.error .status-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(229, 103, 103, 0.1);
}

.compile-button,
.local-deploy-button {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 7px;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition:
    transform 120ms ease,
    background 120ms ease;
}

.compile-button {
  min-width: 142px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  background: var(--panel-raised);
  color: var(--text-soft);
}

.compile-button.is-loading kbd {
  display: none;
}

.compile-button:hover {
  border-color: #555551;
  background: var(--panel-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.local-deploy-button {
  width: 132px;
  min-width: 132px;
  border: 1px solid #ff9b60;
  background: var(--orange);
  color: #1b120d;
  box-shadow: 0 5px 18px rgba(244, 123, 53, 0.17);
}

.local-deploy-button:hover {
  background: var(--orange-bright);
  transform: translateY(-1px);
}

.compile-button:disabled,
.local-deploy-button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
}

.compile-button.is-loading:disabled,
.local-deploy-button.is-loading:disabled {
  cursor: wait;
}

.button-spinner {
  display: none;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: button-spinner 700ms linear infinite;
}

.is-loading .button-spinner {
  display: inline-block;
}

.is-loading .button-idle-icon {
  display: none;
}

@keyframes button-spinner {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .button-spinner {
    animation: none;
  }
}

.run-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: grid;
  place-items: center;
}

.run-icon::before {
  width: 0;
  height: 0;
  box-sizing: content-box;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  content: '';
  transform: translateX(1px);
}

.deploy-icon {
  font-size: 15px;
  line-height: 1;
}

kbd {
  padding: 2px 5px;
  border: 1px solid rgba(27, 18, 13, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.16);
  font-family: var(--mono);
  font-size: 9px;
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 218px minmax(420px, 1fr) minmax(340px, 37vw);
  background: var(--bg);
}

.sidebar,
.editor-column,
.inspector {
  min-width: 0;
  min-height: 0;
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: #161616;
}

.sidebar-heading {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px 0 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.icon-button {
  width: 27px;
  height: 27px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.project-title {
  padding: 9px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.chevron {
  display: inline-block;
  width: 16px;
  color: var(--muted);
}

.file-list {
  padding: 7px 0;
}

.file-button {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 28px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: #a8a7a3;
  font-family: var(--mono);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.file-button:hover {
  background: #202020;
  color: var(--text);
}

.file-button.active {
  border-left-color: var(--orange);
  background: var(--orange-soft);
  color: #f0e6df;
}

.language-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
}

.file-skeleton {
  width: 62%;
  height: 8px;
  margin: 14px 28px;
  border-radius: 4px;
  background: #252525;
}

.file-skeleton.short {
  width: 45%;
}

.sidebar-note {
  margin: auto 14px 16px;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.sidebar-note p {
  margin: 0;
}

.sidebar-note-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--orange);
  font-family: Georgia, serif;
  font-size: 10px;
}

.editor-column {
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr) 24px;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.editor-tabs {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: #151515;
}

.editor-tab {
  min-width: 172px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--border);
  border-top: 2px solid transparent;
  background: #1b1b1b;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.editor-tab.active {
  border-top-color: var(--orange);
  background: var(--panel);
  color: var(--text);
}

.tab-close {
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
}

.editor-wrap {
  min-height: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  overflow: hidden;
  background: #191919;
}

.line-numbers {
  overflow: hidden;
  padding: 18px 13px 48px 0;
  border-right: 1px solid #222;
  color: #545450;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.62;
  text-align: right;
  user-select: none;
  white-space: pre;
}

.line-numbers .problem-line {
  color: var(--red);
}

.code-layer {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

#highlighted-code,
#source-editor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 18px 22px 48px;
  border: 0;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-ligatures: none;
  line-height: 1.62;
  tab-size: 2;
  white-space: pre;
  overflow: auto;
}

#highlighted-code {
  pointer-events: none;
  color: #deded9;
}

#highlighted-code code {
  font: inherit;
}

#source-editor {
  z-index: 1;
  resize: none;
  background: transparent;
  color: transparent;
  caret-color: #fff4ec;
  -webkit-text-fill-color: transparent;
  selection-color: #fff;
}

#source-editor::selection {
  background: rgba(244, 123, 53, 0.28);
}

.tok-comment {
  color: #777d70;
  font-style: italic;
}
.tok-string {
  color: #d7ad80;
}
.tok-number {
  color: #c9a1e6;
}
.tok-keyword {
  color: #ff9251;
}
.tok-type {
  color: #73b7b1;
}
.tok-decorator {
  color: #e2b354;
}
.tok-property {
  color: #8eb8e1;
}
.tok-function {
  color: #e7d38b;
}

.source-error,
.source-warning {
  text-decoration-line: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 1.3px;
  text-underline-offset: 3px;
}

.source-error {
  text-decoration-color: var(--red);
  background: rgba(229, 103, 103, 0.09);
}

.source-warning {
  text-decoration-color: var(--yellow);
  background: rgba(223, 179, 93, 0.08);
}

.editor-statusbar {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 0 12px;
  border-top: 1px solid var(--border);
  background: #151515;
  color: var(--muted);
  font-size: 9px;
}

.status-spacer {
  flex: 1;
}

.editor-statusbar button {
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.editor-statusbar button:hover {
  color: var(--text);
}

.inspector {
  display: grid;
  grid-template-rows: auto auto 40px minmax(0, 1fr) 34px;
  background: #141414;
}

.inspector-header {
  min-height: 88px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 14px;
}

.eyebrow {
  color: var(--orange);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.inspector h1 {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

#contract-select {
  max-width: 148px;
  height: 30px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--panel-raised);
  color: var(--text-soft);
  font-size: 10px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 0 20px 18px;
}

.metric {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  background: #1a1a1a;
}

.metric:first-child {
  border-radius: 6px 0 0 6px;
}

.metric:last-child {
  border-radius: 0 6px 6px 0;
}

.metric span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
}

.metric small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 8px;
}

.output-tabs {
  display: flex;
  align-items: flex-end;
  overflow-x: auto;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}

.output-tab {
  height: 40px;
  padding: 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
}

.output-tab:hover {
  color: var(--text-soft);
}

.output-tab.active {
  border-bottom-color: var(--orange);
  color: var(--text);
}

.output-tab span {
  min-width: 17px;
  display: inline-block;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 9px;
  background: var(--panel-soft);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  text-align: center;
}

.output-content {
  min-height: 0;
  overflow: hidden;
}

.output-panel {
  height: 100%;
  display: none;
  overflow: auto;
  padding: 14px;
}

.output-panel.active {
  display: block;
}

.empty-state {
  height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state-mark {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 16px;
}

.empty-state strong {
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 12px;
}

.empty-state p {
  max-width: 230px;
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
}

.empty-state .execution-primary {
  margin-top: 15px;
}

.diagnostic {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 10px;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.diagnostic:hover {
  border-color: var(--border-strong);
  border-radius: 6px;
  background: #1b1b1b;
}

.diagnostic-dot {
  width: 7px;
  height: 7px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--red);
}

.diagnostic.warning .diagnostic-dot {
  background: var(--yellow);
}

.diagnostic-message {
  display: block;
  color: #d4d3cf;
  font-size: 10px;
  line-height: 1.45;
}

.diagnostic-code,
.diagnostic-location {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.diagnostic-location {
  white-space: nowrap;
}

.code-output {
  min-height: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #101010;
  color: #c8c7c3;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bytecode-group + .bytecode-group {
  margin-top: 16px;
}

.bytecode-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bytecode-heading span {
  color: var(--orange);
  font-family: var(--mono);
}

.storage-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) 50px 48px;
  gap: 8px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
}

.storage-row.header {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#panel-interact {
  padding: 0;
}

.execution-shell {
  min-height: 100%;
  padding: 14px;
}

.environment-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #101010;
}

.environment-button {
  height: 31px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.environment-button.active {
  background: var(--panel-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.execution-card {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #191919;
}

.execution-card-heading,
.function-heading,
.activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.execution-card-heading strong,
.function-heading strong,
.activity-heading strong {
  color: var(--text);
  font-size: 10px;
}

.execution-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.execution-badge {
  max-width: 180px;
  overflow: hidden;
  padding: 4px 7px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.execution-badge.live {
  border-color: rgba(112, 185, 139, 0.35);
  background: rgba(112, 185, 139, 0.08);
  color: var(--green);
}

.execution-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.execution-primary,
.execution-secondary,
.function-run {
  min-height: 31px;
  padding: 0 11px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.execution-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.execution-primary .button-label {
  line-height: 1;
}

.execution-primary,
.function-run {
  border: 1px solid #ff985b;
  background: var(--orange);
  color: #1c120d;
}

.execution-primary:hover,
.function-run:hover {
  background: var(--orange-bright);
}

.execution-secondary {
  border: 1px solid var(--border-strong);
  background: var(--panel-raised);
  color: var(--text-soft);
}

.execution-primary:disabled,
.execution-secondary:disabled,
.function-run:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.execution-primary.is-loading:disabled {
  cursor: wait;
}

#compile-deploy-local {
  min-width: 156px;
}

#deploy-local {
  min-width: 92px;
}

.execution-field,
.argument-field {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.execution-field label,
.argument-field label {
  display: flex;
  justify-content: space-between;
  color: var(--text-soft);
  font-size: 8px;
}

.execution-field label code,
.argument-field label code {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 8px;
}

.argument-name {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.argument-name small {
  padding: 1px 4px;
  border: 1px solid rgba(244, 123, 53, 0.28);
  border-radius: 999px;
  color: var(--orange-bright);
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.execution-field input,
.argument-field input {
  width: 100%;
  height: 31px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #101010;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
}

.execution-field input::placeholder,
.argument-field input::placeholder {
  color: #545450;
}

.constructor-fields {
  margin-top: 10px;
  padding-top: 2px;
}

.constructor-label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.function-list,
.activity-feed {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-kicker::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--border);
}

.function-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #181818;
}

.function-signature {
  min-width: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.function-signature span {
  color: var(--orange-bright);
}

.mutability-badge {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 9px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.mutability-badge.read {
  background: rgba(112, 185, 139, 0.1);
  color: var(--green);
}

.function-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.function-run {
  min-width: 78px;
}

.activity-card {
  padding: 11px;
  border-left: 2px solid var(--border-strong);
  border-radius: 0 5px 5px 0;
  background: #181818;
}

.activity-card.success {
  border-left-color: var(--green);
}

.activity-card.error {
  border-left-color: var(--red);
}

.activity-card.pending {
  border-left-color: var(--yellow);
}

.activity-heading time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.activity-detail {
  margin-top: 7px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.event-list {
  display: grid;
  gap: 5px;
  margin-top: 8px;
}

.event-chip {
  padding: 7px;
  border: 1px solid rgba(244, 123, 53, 0.22);
  border-radius: 5px;
  background: var(--orange-soft);
  color: #dbc7b9;
  font-family: var(--mono);
  font-size: 8px;
  overflow-wrap: anywhere;
}

.event-chip strong {
  color: var(--orange-bright);
}

.wallet-warning {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid rgba(223, 179, 93, 0.25);
  border-radius: 5px;
  background: rgba(223, 179, 93, 0.06);
  color: #c9b17e;
  font-size: 8px;
  line-height: 1.5;
}

.inspector-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-top: 1px solid var(--border);
  background: #151515;
  color: var(--muted);
  font-size: 9px;
}

.inspector-footer button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.inspector-footer button:hover {
  color: var(--orange-bright);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: 320px;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--orange);
  border-radius: 6px;
  background: #242424;
  color: var(--text-soft);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .workspace {
    grid-template-columns: 178px minmax(380px, 1fr) 330px;
  }

  .topbar {
    grid-template-columns: 190px 1fr auto;
  }

  .brand-copy span,
  .toolchain-status,
  .compile-button kbd {
    display: none;
  }

  .compile-button {
    min-width: 132px;
  }

  .local-deploy-button {
    width: 112px;
    min-width: 112px;
  }
}

@media (max-width: 900px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100%;
    height: auto;
  }

  .topbar {
    grid-template-columns: 1fr auto;
  }

  .topbar-center {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
    padding-left: 8px;
  }

  .compile-button {
    width: 42px;
    min-width: 42px;
    padding: 0;
  }

  .compile-button .button-label,
  .compile-button kbd {
    display: none;
  }

  .workspace {
    min-height: calc(100vh - 58px);
    grid-template-columns: 1fr;
    grid-template-rows: 46px minmax(520px, 68vh) minmax(520px, 70vh);
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-heading,
  .project-title,
  .sidebar-note {
    display: none;
  }

  .file-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 6px 10px;
  }

  .file-button {
    width: auto;
    flex: 0 0 auto;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 5px;
  }

  .file-button.active {
    border-color: var(--orange);
  }

  .editor-column {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Workbench 0.3 component layer */

.explorer-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.project-title {
  width: 100%;
  display: flex;
  align-items: center;
  border-right: 0;
  border-left: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.file-tree {
  min-height: 0;
  overflow: auto;
  padding: 6px 0 12px;
}

.tree-row {
  position: relative;
  height: 31px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px 0 calc(8px + var(--tree-depth, 0) * 14px);
  border-left: 2px solid transparent;
  color: #aaa9a5;
  font-family: var(--mono);
  font-size: 10px;
  cursor: default;
  user-select: none;
}

.tree-row:hover,
.tree-row.selected {
  background: #202020;
  color: var(--text);
}

.tree-row.active {
  border-left-color: var(--orange);
  background: var(--orange-soft);
  color: #f5e8df;
}

.tree-row:focus-visible {
  outline: 1px solid var(--orange);
  outline-offset: -2px;
}

.tree-chevron {
  width: 11px;
  flex: 0 0 11px;
  color: #777773;
  font-family: var(--sans);
  font-size: 13px;
}

.tree-chevron.spacer {
  opacity: 0;
}

.folder-icon,
.generic-file-icon {
  width: 16px;
  flex: 0 0 16px;
  color: #a88a72;
  text-align: center;
}

.jeth-file-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  object-fit: contain;
}

.tree-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-more {
  width: 26px;
  height: 24px;
  display: none;
  margin-left: auto;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.tree-row:hover .tree-more,
.tree-row:focus-within .tree-more {
  display: block;
}

.tree-more:hover {
  background: #303030;
  color: var(--text);
}

.tree-rename-input {
  min-width: 0;
  height: 23px;
  flex: 1;
  padding: 0 5px;
  border: 1px solid var(--orange);
  border-radius: 3px;
  background: #111;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}

.tree-empty {
  padding: 22px 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.context-menu {
  position: fixed;
  z-index: 90;
  width: 188px;
  padding: 5px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #242424;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.context-menu[hidden] {
  display: none;
}

.context-menu button {
  width: 100%;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-soft);
  font-size: 10px;
  text-align: left;
  cursor: pointer;
}

.context-menu button:hover,
.context-menu button:focus-visible {
  background: var(--orange-soft);
  color: var(--text);
}

.context-menu button.danger {
  color: #ee8b8b;
}

.context-menu kbd {
  border-color: var(--border-strong);
  background: #191919;
  color: var(--muted);
}

.context-separator {
  display: block;
  height: 1px;
  margin: 4px 3px;
  background: var(--border);
}

.editor-tabs {
  min-width: 0;
  overflow-x: auto;
}

.editor-tab {
  min-width: 138px;
  max-width: 210px;
  padding: 0 5px 0 10px;
}

.editor-tab .tab-open {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: var(--mono);
  font-size: 10px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.editor-tab .tab-close {
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.editor-tab .tab-close:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.tab-dirty {
  color: var(--orange);
  font-size: 7px;
}

.editor-body {
  min-width: 0;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.editor-column {
  position: relative;
}

.editor-body .editor-wrap {
  min-width: 0;
  flex: 1;
}

.editor-empty {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  background: #191919;
  color: var(--muted);
  text-align: center;
}

.editor-empty[hidden] {
  display: none;
}

.editor-empty img {
  width: 50px;
  height: 50px;
  margin-bottom: 8px;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(244, 123, 53, 0.22));
}

.editor-empty strong {
  color: var(--text-soft);
  font-size: 12px;
}

.editor-empty span {
  font-size: 10px;
}

.editor-wrap {
  position: relative;
}

.use-place-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px !important;
  border: 1px solid transparent !important;
  border-radius: 9px;
}

.use-place-toggle span {
  min-width: 15px;
  padding: 1px 4px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-family: var(--mono);
}

.use-place-toggle.active {
  border-color: rgba(244, 123, 53, 0.3) !important;
  background: var(--orange-soft) !important;
  color: var(--orange-bright) !important;
}

.use-place-drawer {
  width: min(340px, 44%);
  min-width: 270px;
  min-height: 0;
  overflow: auto;
  border-left: 1px solid var(--border);
  background: #151515;
  box-shadow: -14px 0 34px rgba(0, 0, 0, 0.18);
}

.use-place-drawer[hidden] {
  display: none;
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 14px 12px;
  border-bottom: 1px solid var(--border);
  background: rgba(21, 21, 21, 0.96);
  backdrop-filter: blur(10px);
}

.drawer-header h2 {
  margin: 4px 0 0;
  font-size: 15px;
}

.drawer-intro {
  margin: 0;
  padding: 12px 14px 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.use-place-status {
  margin: 8px 14px;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #191919;
  color: var(--text-soft);
  font-size: 9px;
  line-height: 1.4;
}

.use-place-content {
  padding: 0 14px 18px;
}

.use-place-note {
  margin: 10px 0 14px;
  padding: 10px;
  border: 1px solid rgba(244, 123, 53, 0.22);
  border-radius: 6px;
  background: rgba(244, 123, 53, 0.06);
}

.use-place-note span {
  color: var(--orange-bright);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.use-place-note p {
  margin: 5px 0 0;
  color: #b8a99f;
  font-size: 8px;
  line-height: 1.5;
}

.use-place-group + .use-place-group {
  margin-top: 16px;
}

.use-place-constructor {
  margin: 0 0 16px;
  padding: 11px;
  border: 1px solid rgba(244, 123, 53, 0.34);
  border-radius: 7px;
  background: #1b1918;
}

.use-place-constructor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.use-place-constructor-heading > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.use-place-constructor-heading strong {
  color: var(--text);
  font-size: 9px;
}

.use-place-constructor-heading > span {
  color: var(--orange);
  font-size: 7px;
  text-transform: uppercase;
}

.use-place-constructor > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}

.use-place-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 7px;
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.use-place-group h3 span {
  min-width: 17px;
  padding: 2px 5px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  text-align: center;
}

.use-place-item {
  margin-top: 7px;
  padding: 10px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--orange);
  border-radius: 6px;
  background: #1a1a1a;
}

.use-place-item.function {
  border-left-color: #8b837d;
}

.use-place-item header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.use-place-item header > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.use-place-item strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  text-overflow: ellipsis;
}

.use-kind {
  padding: 2px 5px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-size: 7px;
  text-transform: uppercase;
}

.use-place-jump {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  cursor: pointer;
}

.use-place-jump:hover {
  color: var(--orange-bright);
}

.use-place-type {
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  overflow-wrap: anywhere;
}

.use-place-run {
  width: 100%;
  height: 29px;
  margin-top: 9px;
  border: 1px solid rgba(244, 123, 53, 0.55);
  border-radius: 5px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-size: 8px;
  font-weight: 800;
  cursor: pointer;
}

.use-place-run:hover {
  background: var(--orange);
  color: #1a110c;
}

.use-place-run:disabled {
  opacity: 0.55;
  cursor: wait;
}

.use-place-result {
  margin-top: 8px;
  padding: 8px;
  border-radius: 5px;
  background: #111;
}

.use-place-result.success {
  border-left: 2px solid var(--green);
}

.use-place-result.error {
  border-left: 2px solid var(--red);
}

.use-place-result strong {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.use-place-result pre {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.metric {
  position: relative;
  min-width: 0;
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px !important;
  background: #1a1a1a;
  color: inherit;
  text-align: left;
  cursor: help;
}

.metric:hover,
.metric:focus-visible {
  border-color: #5a4639;
  background: #1e1b19;
}

.metric-tooltip {
  position: absolute;
  left: 6px;
  top: calc(100% + 5px);
  z-index: 30;
  width: 176px;
  display: none !important;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #292929;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  color: var(--text-soft);
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.metric:hover .metric-tooltip,
.metric:focus-visible .metric-tooltip {
  display: grid !important;
  gap: 5px;
}

.metric-tooltip > span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--text-soft);
  font-size: 8px;
}

.metric-tooltip b {
  color: var(--muted);
  font-weight: 500;
}

.problem-tab:not([hidden]) {
  color: #e98686;
}

.artifact-code-section + .artifact-code-section {
  margin-top: 14px;
}

.artifact-code-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.artifact-code-section > header > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.artifact-code-section > header strong {
  color: var(--text-soft);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.artifact-code-section > header span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 8px;
}

.copy-code,
.copy-account {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #1c1c1c;
  color: var(--muted);
  cursor: pointer;
}

.copy-code:hover,
.copy-account:hover {
  border-color: rgba(244, 123, 53, 0.5);
  color: var(--orange-bright);
}

.artifact-code-section .code-output {
  min-height: 0;
  max-height: 58vh;
  overflow: auto;
  white-space: pre;
}

.artifact-code-section .code-output.bytecode {
  white-space: pre-wrap;
  word-break: break-all;
}

.json-key {
  color: #e79a5e;
}

.json-string {
  color: #c9b083;
}

.json-number,
.yul-number {
  color: #c89be5;
}

.json-boolean,
.json-null {
  color: #74b9b1;
}

.json-punctuation,
.yul-punctuation {
  color: #777773;
}

.yul-comment {
  color: #71786b;
  font-style: italic;
}

.yul-string {
  color: #d6aa7d;
}

.yul-keyword {
  color: var(--orange-bright);
}

.yul-builtin {
  color: #7fb7df;
}

.yul-identifier {
  color: #d8d7d2;
}

.environment-button.soon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: not-allowed;
  opacity: 0.62;
}

.soon-badge {
  padding: 2px 5px;
  border: 1px solid rgba(244, 123, 53, 0.35);
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-size: 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.execution-card-heading > div {
  display: grid;
  gap: 3px;
}

.execution-card-heading > div > span {
  color: var(--muted);
  font-size: 8px;
}

.account-picker {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #131313;
}

.account-picker > label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.account-picker select {
  width: 100%;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #202020;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
}

.account-detail {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.account-detail > span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deployment-registry {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(244, 123, 53, 0.22);
  border-radius: 7px;
  background: linear-gradient(145deg, rgba(244, 123, 53, 0.055), #171717 52%);
}

.deployment-registry.empty {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.deployment-registry.empty > div,
.registry-heading > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.deployment-registry strong {
  color: var(--text);
  font-size: 9px;
}

.deployment-registry span {
  color: var(--muted);
  font-size: 7px;
  line-height: 1.45;
}

.registry-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.registry-count {
  min-width: 24px;
  padding: 3px 6px;
  border: 1px solid rgba(244, 123, 53, 0.32);
  border-radius: 12px;
  background: var(--orange-soft);
  color: var(--orange-bright) !important;
  font-family: var(--mono);
  font-size: 8px !important;
  text-align: center;
}

.registry-field {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.registry-field > span {
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.registry-field select {
  min-width: 0;
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: #101010;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 8px;
}

.deployment-profile {
  display: grid;
  gap: 5px;
  margin-top: 11px;
  padding: 9px 10px;
  border-left: 2px solid var(--orange);
  border-radius: 0 5px 5px 0;
  background: #141414;
}

.deployment-profile-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.source-detected {
  padding: 2px 5px;
  border: 1px solid rgba(99, 190, 132, 0.32);
  border-radius: 999px;
  background: rgba(99, 190, 132, 0.08);
  color: var(--green);
  font-family: var(--mono);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.deployment-profile .deployment-kind {
  color: var(--orange-bright);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.deployment-profile p {
  margin: 0;
  font-size: 8px;
}

.detected-builtins {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.detected-builtins code,
.detected-builtins span {
  padding: 2px 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: #0e0e0e;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 6px;
}

.automatic-route {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
}

.automatic-route-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(99, 190, 132, 0.35);
  border-radius: 50%;
  background: rgba(99, 190, 132, 0.08);
  color: var(--green) !important;
  font-size: 8px !important;
}

.automatic-route.unresolved .automatic-route-icon {
  border-color: rgba(244, 123, 53, 0.45);
  background: var(--orange-soft);
  color: var(--orange-bright) !important;
}

.automatic-route > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.automatic-route > div span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automatic-route em {
  color: var(--green);
  font-size: 6px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.automatic-route.unresolved em {
  color: var(--orange-bright);
}

.storage-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding: 8px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--orange);
  border-radius: 5px;
  background: #171717;
  color: var(--muted);
  font-size: 8px;
}

.storage-context strong {
  color: var(--text-soft);
}

.storage-context code {
  color: var(--orange-bright);
  font-family: var(--mono);
  font-size: 7px;
}

.contract-context {
  position: sticky;
  top: -14px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 13px 0 10px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--orange);
  border-radius: 6px;
  background: rgba(27, 27, 27, 0.96);
  backdrop-filter: blur(10px);
}

.contract-context > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.contract-context span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contract-context strong,
.contract-context code {
  overflow: hidden;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stale-banner {
  display: grid;
  gap: 3px;
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid rgba(223, 179, 93, 0.3);
  border-radius: 6px;
  background: rgba(223, 179, 93, 0.07);
}

.stale-banner strong {
  color: var(--yellow);
  font-size: 9px;
}

.stale-banner span {
  color: #bba77e;
  font-size: 8px;
}

.function-toolbar {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.function-search {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #101010;
  color: var(--muted);
}

.function-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 9px;
}

.function-filters {
  display: flex;
  gap: 5px;
  overflow-x: auto;
}

.function-filters button {
  height: 25px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  cursor: pointer;
}

.function-filters button.active {
  border-color: rgba(244, 123, 53, 0.45);
  background: var(--orange-soft);
  color: var(--orange-bright);
}

.function-group + .function-group {
  margin-top: 15px;
}

.function-group > header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
}

.function-group > header strong {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.function-group > header span {
  min-width: 17px;
  padding: 2px 5px;
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 7px;
  text-align: center;
}

details.function-card {
  padding: 0;
  overflow: hidden;
}

details.function-card + details.function-card {
  margin-top: 7px;
}

.function-card.read {
  border-left: 2px solid var(--green);
}

.function-card.write {
  border-left: 2px solid #8b837d;
}

.function-card.payable {
  border-left: 2px solid var(--orange);
}

.function-card summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  list-style: none;
  cursor: pointer;
}

.function-card summary::-webkit-details-marker {
  display: none;
}

.function-card summary:hover {
  background: #1f1f1f;
}

.function-kind-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--muted);
}

.function-card.read .function-kind-dot {
  background: var(--green);
}

.function-card.payable .function-kind-dot {
  background: var(--orange);
}

.function-card summary .function-signature {
  flex: 1;
}

.mutability-badge.write {
  background: #292929;
  color: #aaa9a5;
}

.mutability-badge.payable {
  background: var(--orange-soft);
  color: var(--orange-bright);
}

.quick-function-run {
  height: 25px;
  flex: 0 0 auto;
  padding: 0 8px;
  border: 1px solid rgba(112, 185, 139, 0.35);
  border-radius: 4px;
  background: rgba(112, 185, 139, 0.08);
  color: var(--green);
  font-size: 7px;
  cursor: pointer;
}

.function-body {
  padding: 1px 10px 10px;
  border-top: 1px solid var(--border);
}

.function-controls {
  align-items: center;
  justify-content: space-between;
}

.function-controls > span {
  color: var(--muted);
  font-size: 7px;
}

.function-result {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--green);
  border-radius: 5px;
  background: #101010;
}

.function-result.error {
  border-left-color: var(--red);
}

.result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result-heading strong {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.function-result pre {
  margin: 7px 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.result-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.section-kicker button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 7px;
  cursor: pointer;
}

.section-kicker button:hover {
  color: var(--orange-bright);
}

@media (max-width: 1180px) {
  .deployment-registry {
    grid-template-columns: 1fr;
  }

  .registry-heading {
    grid-column: 1;
  }
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.toast.visible {
  pointer-events: auto;
}

.toast button {
  flex: 0 0 auto;
  padding: 4px 7px;
  border: 1px solid rgba(244, 123, 53, 0.4);
  border-radius: 4px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-size: 9px;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 200px minmax(380px, 1fr) minmax(330px, 38vw);
  }

  .metric {
    padding: 8px;
  }

  .metric strong {
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .workspace {
    grid-template-rows: minmax(180px, 24vh) minmax(520px, 68vh) minmax(560px, 74vh);
  }

  .sidebar-heading,
  .project-title {
    display: flex;
  }

  .sidebar-note {
    display: none;
  }

  .file-tree {
    min-height: 120px;
  }

  .use-place-drawer {
    position: absolute;
    inset: 40px 0 24px auto;
    z-index: 20;
    width: min(360px, 88vw);
  }
}

/* Workbench 0.4 editor and layout */

.brand-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
}

.brand-mark img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.layout-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.layout-toggle {
  height: 29px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #1c1c1c;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.layout-toggle:hover,
.layout-toggle[aria-pressed='true'] {
  border-color: #4b4039;
  color: var(--text-soft);
}

.layout-toggle[aria-pressed='true'] span:first-child {
  color: var(--orange);
}

.workspace {
  --explorer-width: 218px;
  --inspector-width: 430px;
  grid-template-columns:
    var(--explorer-width) 5px minmax(420px, 1fr) 5px
    var(--inspector-width);
}

.workspace.sidebar-hidden {
  grid-template-columns: minmax(420px, 1fr) 5px var(--inspector-width);
}

.workspace.inspector-hidden {
  grid-template-columns: var(--explorer-width) 5px minmax(420px, 1fr);
}

.workspace.sidebar-hidden.inspector-hidden {
  grid-template-columns: minmax(420px, 1fr);
}

.workspace.sidebar-hidden .sidebar,
.workspace.sidebar-hidden #sidebar-resizer,
.workspace.inspector-hidden .inspector,
.workspace.inspector-hidden #inspector-resizer {
  display: none;
}

.panel-resizer {
  position: relative;
  z-index: 9;
  min-width: 5px;
  min-height: 0;
  background: #151515;
  cursor: col-resize;
  touch-action: none;
}

.panel-resizer::after {
  position: absolute;
  inset: 0 1px;
  content: '';
  background: transparent;
  transition: background 120ms ease;
}

.panel-resizer:hover::after,
.panel-resizer:focus-visible::after,
.panel-resizer.dragging::after {
  background: var(--orange);
}

.panel-resizer:focus-visible {
  outline: 1px solid var(--orange);
  outline-offset: -1px;
}

.sidebar {
  border-right: 0;
}

.file-tree {
  flex: 1;
  min-height: 80px;
}

.tree-row.cut-pending {
  opacity: 0.48;
}

.context-menu button:disabled {
  color: #5f5f5c;
  cursor: not-allowed;
}

.context-menu button:disabled:hover {
  background: transparent;
  color: #5f5f5c;
}

.editor-column {
  border-right: 0;
}

.editor-wrap,
.editor-body .editor-wrap {
  display: block;
}

.code-editor-host {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #191919;
}

#source-editor.code-editor-host {
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #191919;
  color: var(--text-soft);
  -webkit-text-fill-color: currentColor;
  white-space: normal;
}

#source-editor.code-editor-host * {
  -webkit-text-fill-color: currentColor;
}

.code-editor-host > .cm-editor {
  height: 100%;
}

.code-editor-host .cm-scroller {
  overscroll-behavior: contain;
}

.code-editor-host .cm-editor,
.code-editor-host .cm-content,
.code-editor-host .cm-gutters,
.code-editor-host .cm-line {
  font-size: var(--editor-font-size, 13px) !important;
}

.editor-zoom-controls {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 1px 2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  user-select: none;
}

.editor-zoom-controls button {
  background: transparent;
  border: none;
  color: var(--text-soft);
  padding: 1px 5px;
  font-size: 11px;
  font-family: var(--font-mono, inherit);
  cursor: pointer;
  border-radius: 3px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  line-height: 1.2;
}

.editor-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-bright);
}

.editor-zoom-controls button:active {
  background: rgba(255, 255, 255, 0.14);
}

.editor-zoom-controls .zoom-reset-btn {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  color: var(--text-muted);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.editor-zoom-controls .zoom-reset-btn:hover {
  color: var(--orange-bright);
}

.editor-empty {
  z-index: 8;
}

.use-place-toggle.active,
.use-place-toggle[aria-pressed='true'] {
  border-color: rgba(244, 123, 53, 0.36) !important;
  background: var(--orange-soft) !important;
  color: var(--orange-bright) !important;
}

.use-place-popover {
  position: fixed;
  z-index: 85;
  width: min(350px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 90px));
  overflow: auto;
  padding: 12px;
  border: 1px solid #52453c;
  border-radius: 9px;
  background: rgba(31, 31, 30, 0.98);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.58);
  color: var(--text-soft);
  backdrop-filter: blur(14px);
}

.use-place-popover[hidden] {
  display: none;
}

.use-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.use-popover-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.use-popover-title strong {
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
}

.use-popover-kind {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.use-popover-close {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.use-popover-close:hover {
  background: var(--panel-soft);
  color: var(--text);
}

.use-popover-signature {
  margin: 8px 0 0;
  color: #9b9994;
  font-family: var(--mono);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.use-popover-notice {
  margin: 10px 0 0;
  padding: 8px 9px;
  border: 1px solid rgba(244, 123, 53, 0.22);
  border-radius: 6px;
  background: rgba(244, 123, 53, 0.06);
  color: #c4b4aa;
  font-size: 9px;
  line-height: 1.5;
}

.use-popover-notice strong {
  color: var(--orange-bright);
}

.use-popover-preview {
  margin-top: 10px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #151515;
}

.use-popover-preview > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.use-popover-preview pre {
  margin: 0;
  color: #e7d38b;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.use-popover-fields {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.use-popover-field label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 8px;
}

.use-popover-field code {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.use-popover-field input,
.use-popover-field select {
  width: 100%;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  outline: none;
  background: #121212;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
}

.use-popover-field input:focus,
.use-popover-field select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(244, 123, 53, 0.12);
}

.use-popover-runtime {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #45413e;
  border-radius: 7px;
  background: #171716;
}

.use-popover-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.use-popover-section-heading strong {
  color: var(--text);
  font-size: 9px;
}

.use-popover-section-heading > span {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.use-popover-section-heading > span.shared {
  color: var(--orange-bright);
}

.use-popover-shared-note {
  margin: 8px 0 0;
  padding: 7px 8px;
  border: 1px solid rgba(244, 123, 53, 0.24);
  border-radius: 5px;
  background: rgba(244, 123, 53, 0.06);
  color: #c7b6aa;
  font-size: 8px;
  line-height: 1.45;
}

.use-popover-runtime-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.use-popover-constructor {
  margin-top: 9px;
  padding: 9px;
  border: 1px solid rgba(244, 123, 53, 0.25);
  border-radius: 6px;
  background: rgba(244, 123, 53, 0.05);
}

.use-popover-constructor .use-popover-fields {
  margin-top: 8px;
}

.use-popover-value {
  margin-top: 7px;
}

.use-popover-inline-notice,
.use-popover-source-note {
  margin: 8px 0 0;
  color: #9f9b96;
  font-size: 8px;
  line-height: 1.45;
}

.use-popover-inline-notice.error {
  color: #db8888;
}

.use-popover-source-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.use-popover-source-action button {
  flex: 0 0 auto;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #222;
  color: var(--text-soft);
  font-size: 8px;
  cursor: pointer;
}

.use-popover-source-action button:hover {
  border-color: rgba(244, 123, 53, 0.48);
  color: var(--orange-bright);
}

.use-popover-source-action button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.use-popover-source-action span {
  color: var(--muted);
  font-size: 7px;
  text-align: right;
}

.use-popover-action {
  width: 100%;
  height: 31px;
  margin-top: 10px;
  border: 1px solid rgba(244, 123, 53, 0.55);
  border-radius: 5px;
  background: var(--orange-soft);
  color: var(--orange-bright);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.use-popover-action:hover {
  background: var(--orange);
  color: #1a110c;
}

.use-popover-action.primary {
  height: 34px;
  background: var(--orange);
  color: #1a110c;
}

.use-popover-action.primary:hover {
  background: var(--orange-bright);
}

.use-popover-action:disabled {
  opacity: 0.58;
  cursor: wait;
}

.use-popover-result {
  margin-top: 9px;
  padding: 8px;
  border-left: 2px solid var(--green);
  border-radius: 4px;
  background: #131716;
}

.use-popover-result.error {
  border-left-color: var(--red);
  background: #181313;
}

.use-popover-result > span,
.use-popover-result-heading > span {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.use-popover-result-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.use-popover-result-heading .copy-code {
  width: 22px;
  height: 22px;
  min-height: 22px;
}

.use-popover-result pre {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 9px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.use-popover-result-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.use-popover-result .event-list {
  margin-top: 7px;
}

.inspector {
  grid-template-areas:
    'header'
    'metrics'
    'tabs'
    'content'
    'footer';
  grid-template-rows: auto auto 38px minmax(0, 1fr) 30px;
}

.inspector-header {
  grid-area: header;
  min-height: 58px;
  align-items: center;
  padding: 10px 13px 8px;
}

.inspector h1 {
  margin-top: 3px;
  font-size: 14px;
}

.inspector-header-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

#contract-select {
  max-width: 125px;
  height: 27px;
}

.metric-grid {
  grid-area: metrics;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
  padding: 0 13px 8px;
}

.metric-grid[hidden],
.workspace.metrics-collapsed .metric-grid {
  display: none;
}

.metric {
  height: 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: 4px !important;
}

.metric > span:first-child {
  min-width: 0;
  display: block;
  overflow: hidden;
  margin: 0 auto 0 0;
  font-size: 7px;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  flex: 0 0 auto;
  font-size: 11px;
}

.metric small {
  display: none;
}

.metric-tooltip {
  top: calc(100% + 3px);
}

.output-tabs {
  grid-area: tabs;
  padding: 0 10px;
}

.output-tab {
  height: 38px;
  padding: 0 7px;
  font-size: 9px;
}

.inspector-footer {
  grid-area: footer;
  min-height: 30px;
}

.output-content {
  grid-area: content;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns:
      var(--explorer-width) 5px minmax(380px, 1fr) 5px
      var(--inspector-width);
  }

  .workspace.sidebar-hidden {
    grid-template-columns: minmax(380px, 1fr) 5px var(--inspector-width);
  }

  .workspace.inspector-hidden {
    grid-template-columns: var(--explorer-width) 5px minmax(380px, 1fr);
  }

  .workspace.sidebar-hidden.inspector-hidden {
    grid-template-columns: minmax(380px, 1fr);
  }

  .layout-toggle span:last-child,
  .toolchain-status {
    display: none;
  }
}

@media (max-width: 900px) {
  .workspace,
  .workspace.sidebar-hidden,
  .workspace.inspector-hidden,
  .workspace.sidebar-hidden.inspector-hidden {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 24vh) minmax(520px, 68vh) minmax(560px, 74vh);
  }

  .panel-resizer {
    display: none;
  }

  .workspace.sidebar-hidden {
    grid-template-rows: minmax(520px, 68vh) minmax(560px, 74vh);
  }

  .workspace.inspector-hidden {
    grid-template-rows: minmax(180px, 24vh) minmax(520px, 68vh);
  }

  .workspace.sidebar-hidden.inspector-hidden {
    grid-template-rows: minmax(620px, calc(100vh - 58px));
  }

  .layout-actions {
    display: flex;
  }

  .use-place-popover {
    left: 12px !important;
    right: 12px;
    bottom: 32px;
    top: auto !important;
    width: auto;
  }
}
