.assembly-studio {
  color: #223a35;
  --line: #d7dfd9;
  --paper: #fffefa;
}
.assembly-studio button,
.assembly-studio input,
.assembly-studio select {
  font: inherit;
  max-width: 100%;
}
.assembly-studio button {
  cursor: pointer;
  background: #fffefa;
  color: #28473e;
  border: 1px solid #cbd6ce;
  border-radius: 5px;
  padding: 8px 10px;
  font-size: 11px;
  transition: background 0.15s;
}
.assembly-studio button:hover {
  background: #e8eee7;
}
.assembly-studio button:focus-visible,
.assembly-studio input:focus-visible {
  outline: 2px solid #916d46;
  outline-offset: 2px;
}
.as-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 0 0 20px;
}
.as-intro h2 {
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 8px 0;
}
.as-intro p {
  font-size: 12px;
  color: #68796e;
}
.as-kicker,
.as-heading {
  font-size: 10px;
  letter-spacing: 1.3px;
  font-weight: 650;
  color: #7a6b50;
}
.as-label {
  font-size: 9px;
  letter-spacing: 0.6px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: normal;
}
.as-session {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.as-session select {
  max-width: 260px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
}
#as-revision {
  font-size: 10px;
  margin-left: auto;
  color: #617568;
}
#as-message {
  min-height: 29px;
  font-size: 12px;
  color: #815e2e;
  padding: 5px 0;
  overflow-wrap: anywhere;
}
.as-workbench {
  display: grid;
  grid-template-columns: 190px minmax(260px, 1fr) 255px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.as-parts,
.as-inspector {
  padding: 17px 13px;
  min-width: 0;
}
.as-parts {
  border-right: 1px solid var(--line);
}
.as-heading {
  margin-bottom: 15px;
}
.as-part {
  display: flex;
  width: 100%;
  text-align: left;
  align-items: center;
  gap: 8px !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 3px !important;
  padding: 10px 6px !important;
  font-size: 11px !important;
}
.as-part.selected {
  background: #e8efe8 !important;
  color: #1a513e !important;
}
.as-part small {
  margin-left: auto;
}
.as-part span {
  font-size: 9px;
}
.as-stack {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}
.as-note {
  font-size: 10px;
  line-height: 1.7;
  color: #6d7b72;
}
.as-stage {
  min-width: 0;
  background: linear-gradient(145deg, #f0f3ed, #e5ece5);
  display: flex;
  flex-direction: column;
}
.as-toolbar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}
.as-toolbar button {
  padding: 6px 8px;
  font-size: 10px;
  background: #f9fbf7;
}
.as-toolbar button.active {
  background: #294f42;
  color: white;
}
#as-canvas {
  width: 100%;
  height: 460px;
  min-width: 0;
  position: relative;
}
#as-canvas canvas {
  display: block;
  max-width: 100%;
  touch-action: none;
}
.as-explode {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 15px;
  font-size: 10px;
}
.as-explode input {
  width: 100%;
  accent-color: #476b55;
}
.as-statebar {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 15px;
  background: #eef2ec;
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.as-statebar span:last-child {
  color: #768378;
  font-size: 9px;
}
.as-inspector {
  border-left: 1px solid var(--line);
  max-height: 625px;
  overflow: auto;
}
.as-inspector h3 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  margin: 5px 0 14px;
}
.as-inspector p {
  font-size: 11px;
  line-height: 1.65;
}
.as-inspector h4 {
  font-size: 11px;
  letter-spacing: 0.4px;
  margin-top: 22px;
}
.as-port {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.as-port small {
  display: block;
  color: #7a867d;
  margin-top: 3px;
}
.as-inspector form {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.as-inspector select,
.as-inspector input {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  background: #fff;
}
.as-device {
  margin-top: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.as-device strong {
  font-size: 11px;
  display: block;
}
.as-device small {
  display: block;
  font-size: 9px;
  color: #748175;
  margin: 7px 0;
}
.as-device button {
  font-size: 9px;
  padding: 5px;
  margin: 2px;
}
.as-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 18px 0;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 7px;
}
.as-metrics > div {
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.as-metrics small {
  font-size: 10px;
  color: #6a7a70;
}
.as-metrics strong {
  font-size: 21px;
  display: block;
  margin-top: 7px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.as-metrics em {
  font-size: 10px;
  font-style: normal;
  color: #78867c;
}
.as-lower {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
}
.as-lower > section {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px;
  min-width: 0;
  background: var(--paper);
}
.as-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.assembly-studio .as-primary {
  background: #315f4b;
  color: #fff;
  border-color: #315f4b;
}
.assembly-studio .as-danger {
  background: #f9ece7;
  border-color: #cba99c;
  color: #8b3e2c;
}
.as-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}
.as-form label {
  font-size: 10px;
  color: #63776a;
}
.as-form input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid var(--line);
  background: #fff;
  margin-top: 5px;
  min-width: 0;
}
.as-form .as-check {
  display: flex;
  gap: 7px;
  align-items: center;
}
.as-form .as-check input {
  width: auto;
}
.as-form button {
  align-self: end;
}
.as-warning {
  color: #8a5626;
  background: #f8f0e3;
  padding: 6px;
  border-radius: 3px;
}
#as-readiness {
  font-size: 11px;
  line-height: 1.6;
  margin-top: 14px;
}
#as-chart svg {
  display: block;
  width: 100%;
  height: auto;
  font-size: 10px;
  fill: #6d8171;
}
#as-events {
  max-height: 180px;
  overflow: auto;
  font-size: 10px;
  overflow-wrap: anywhere;
}
#as-events p {
  border-top: 1px solid var(--line);
  padding-top: 8px;
  line-height: 1.6;
}
#as-events small {
  display: block;
  color: #8a785c;
}
.as-render-fallback {
  padding: 50px 25px;
  font-size: 14px;
  line-height: 1.8;
}
.nav-group {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #91a49a;
  padding: 16px 15px 5px;
}
main:has(.assembly-studio) {
  max-width: 1900px;
}
@media (min-width: 1600px) {
  #as-canvas {
    height: 570px;
  }
}
@media (max-width: 1200px) {
  .as-workbench {
    grid-template-columns: 155px minmax(220px, 1fr);
  }
  .as-inspector {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: none;
  }
  .as-inspector #as-inspector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .as-lower {
    grid-template-columns: 1fr 1fr;
  }
  .as-lower > section:last-child {
    grid-column: 1/-1;
  }
  .as-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .as-intro {
    display: block;
  }
  .as-intro .as-label {
    display: inline-block;
    margin-top: 5px;
  }
  .as-workbench {
    display: block;
  }
  .as-parts {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  #as-bom {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .as-stack {
    grid-template-columns: 1fr 1fr;
    margin-top: 10px;
  }
  #as-canvas {
    height: 350px;
  }
  .as-inspector #as-inspector {
    display: block;
  }
  .as-lower {
    display: block;
  }
  .as-lower > section {
    margin-bottom: 12px;
  }
  .as-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .as-metrics strong {
    font-size: 20px;
  }
  .as-session select {
    max-width: 100%;
    width: 100%;
  }
  #as-revision {
    margin: 0;
    width: 100%;
  }
  .as-form {
    gap: 8px;
  }
  .as-toolbar button {
    font-size: 9px;
  }
  .as-statebar span:last-child {
    width: 100%;
  }
  .as-intro h2 {
    line-height: 1.3;
  }
}
