.set-fields {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.set-fields label span {
  font-size: 10px;
}

.set-fields label > b {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  border-radius: 50%;
  background: #e8eef1;
  color: var(--ink);
  font-size: 11px;
}

.set-fields select {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.weight-question {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid #dce3e7;
  border-radius: 9px;
  background: #fff;
}

.weight-help {
  float: none !important;
  display: block;
  margin-top: 7px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  line-height: 1.35;
}

.exact-weight {
  float: none !important;
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 8px !important;
}

.exact-weight[hidden] {
  display: none !important;
}

.exact-weight input {
  margin: 0;
}

.exact-weight em {
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.advanced-field {
  grid-column: 1 / -1;
  padding-top: 7px;
  border-top: 1px dashed var(--line);
}

/* Customer intake-panel refinement */
main {
  grid-template-columns: minmax(440px, 500px) minmax(0, 1fr);
}

.panel {
  padding: 30px 32px 36px;
  border-right: 1px solid rgba(23, 42, 58, 0.08);
  background: #fbfcfd;
}

.panel-head {
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-toggle {
  padding: 9px 12px;
  border-radius: 999px;
  background: #edf2f4;
  font-weight: 800;
}

h1 {
  max-width: 360px;
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.intro {
  max-width: 410px;
  margin-bottom: 26px;
  font-size: 14px;
  line-height: 1.6;
}

.sets-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding: 0 2px;
}

.sets-heading-copy {
  display: grid;
  gap: 2px;
}

.sets-heading-copy strong {
  font-size: 16px;
}

.sets-heading-copy span {
  line-height: 1.3;
}

.unit-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #cfd9df;
  border-radius: 999px;
  background: #edf2f4;
}

.unit-toggle button {
  min-width: 42px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: transparent;
  color: #526b7a;
  font-size: 12px;
  line-height: 1;
}

.unit-toggle button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 2px 6px rgba(23, 42, 58, 0.18);
}

#sleeve-sets {
  gap: 18px;
}

.sleeve-set {
  padding: 0 17px 18px;
  border-color: #dbe3e7;
  border-radius: 15px;
  background: #f4f7f8;
  box-shadow: 0 4px 14px rgba(23, 42, 58, 0.045);
}

.sleeve-set legend {
  margin: 0 -5px 12px;
  padding: 13px 6px 10px;
  border-bottom: 1px solid #dde5e9;
  font-size: 14px;
}

.remove-set {
  padding: 3px 7px;
  border-radius: 6px;
}

.set-fields {
  gap: 14px 12px;
}

.set-fields label {
  min-width: 0;
  color: #223746;
  font-size: 12px;
  line-height: 1.35;
}

.set-fields label > b {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  background: #dfe8ec;
  color: #284457;
  font-size: 11px;
}

.set-fields label > span:not(.weight-help):not(.exact-weight) {
  display: block;
  float: none;
  margin: 4px 0 0 30px;
  min-height: 14px;
  color: #72838f;
  font-size: 10px;
  line-height: 1.25;
  text-align: left;
}

.set-fields input,
.set-fields select {
  min-height: 44px;
  border-color: #cfd9df;
  background: #fff;
}

.set-fields input {
  margin-top: 7px;
  padding: 10px 12px;
}

.weight-question {
  padding: 15px;
  border-color: #ccdce3;
  background: #fff;
  box-shadow: 0 2px 8px rgba(23, 42, 58, 0.035);
}

.weight-question select {
  margin-top: 12px;
}

.weight-help {
  margin: 9px 0 0 30px !important;
}

.advanced-field {
  margin-top: 2px;
  padding: 12px 0 0;
  color: #506674 !important;
}

#add-set {
  margin-top: 2px;
  border-style: solid;
  background: #fff;
}

#load-form > button[type="submit"] {
  min-height: 48px;
  box-shadow: 0 7px 18px rgba(232, 79, 54, 0.18);
}

.result {
  margin-top: 20px;
  border: 1px solid #dde5e9;
  background: #fff;
}

.build-actions {
  gap: 9px !important;
}

.note {
  padding: 12px 14px;
  border-left: 3px solid #d78625;
  border-radius: 0 8px 8px 0;
  background: #fff7eb;
  color: #6b4a20;
  line-height: 1.5;
}

@media (max-width: 980px) and (min-width: 761px) {
  main {
    grid-template-columns: minmax(400px, 46vw) minmax(0, 1fr);
  }

  .panel {
    padding-inline: 24px;
  }
}

button:disabled {
  cursor: wait;
  filter: none;
  opacity: 0.5;
}

.load-error {
  max-width: 360px;
  padding: 20px;
  text-align: center;
  line-height: 1.5;
  text-transform: none;
  letter-spacing: 0;
}

.load-error button {
  display: block;
  margin: 14px auto 0;
}

.dimension-key strong {
  color: var(--ink);
  letter-spacing: 0.02em;
  text-transform: none;
}

@media (max-width: 760px) {
  main {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 22px 18px 28px;
  }

  .panel-head {
    margin-bottom: 18px;
  }

  h1 {
    font-size: 29px;
  }

  .set-fields {
    grid-template-columns: 1fr;
  }

  .weight-question,
  .advanced-field {
    grid-column: 1;
  }

  .sets-heading {
    align-items: center;
    gap: 12px;
  }

  .viewer-status > span:not(.verification-state) {
    display: none;
  }

  .view-controls {
    top: auto;
    bottom: 12px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
  }

  .dimension-key {
    bottom: 78px;
  }

  .hint {
    display: block;
    right: 12px;
    bottom: 126px;
  }
}
