.brand {
  gap: 14px;
}

.brand-logo {
  display: block;
  width: 210px;
  height: auto;
}

.brand-product {
  padding-left: 14px;
  border-left: 1px solid #4a5157;
}

.brand-product strong,
.brand-product small {
  display: block;
}

.drawing-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 16px 18px;
  border: 1px dashed #d9302f;
  background: #fff8f5;
  color: #11161a;
  font-weight: 700;
  cursor: pointer;
}

.drawing-upload input {
  max-width: 52%;
  font-weight: 400;
}

.drawing-paste-target {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #c9c5bf;
  background: #fff;
  color: #4b545c;
  text-align: center;
  cursor: text;
}

.drawing-import-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.drawing-demo-button {
  border: 1px solid #14191d;
  background: #14191d;
  color: #fff;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.drawing-paste-target:focus {
  border-color: #d9302f;
  outline: 2px solid rgba(217, 48, 47, .16);
}

.drawing-preview {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 130px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #d4d0ca;
  background: #f8f7f4;
  color: #687078;
  text-align: center;
}

.drawing-preview img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.drawing-pdf-frame {
  width: 100%;
  height: 420px;
  border: 1px solid #c9c5bf;
  background: #fff;
}

.drawing-loaded {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: #edf7ef;
  color: #1b5e2a;
  text-align: left;
}

.drawing-loaded div,
.drawing-loaded span { display: block; }

.drawing-loaded-mark {
  display: grid !important;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f7a35;
  color: #fff;
  font-weight: 800;
}

.drawing-next-step {
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid #d9302f;
  background: #fff5f1;
  color: #333b41;
  text-align: left;
}

.drawing-analysis {
  display: grid;
  gap: 12px;
  width: 100%;
  text-align: left;
}

.analysis-progress,
.analysis-head,
.analysis-warning,
.analysis-applied {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #d6d2cc;
  background: #fff;
}

.analysis-head div,
.analysis-applied { display: grid; gap: 4px; }
.analysis-head span,
.analysis-applied span,
.analysis-warning span,
.analysis-warning small { display: block; }
.analysis-warning { display: grid; border-left: 3px solid #d98b22; background: #fff8eb; }
.analysis-applied { border-left: 3px solid #1f7a35; background: #f1f8f2; }
.analysis-applied small { color: #687078; }
.analysis-applied strong { color: #145f2b; }
.analysis-applied em { color: #8a4b00; font-style: normal; font-weight: 700; }
.analysis-applied span > strong,
.analysis-applied span > em { margin-left: 5px; }
.analysis-applied span > small { display: block; margin: 2px 0 5px; }

.analysis-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: #d6d2cc;
  border: 1px solid #d6d2cc;
}

.analysis-facts > b { grid-column: 1 / -1; padding: 11px 13px; background: #171b1f; color: #fff; }
.analysis-facts > span { display: grid; gap: 3px; padding: 11px 13px; background: #fff; }
.analysis-facts small { color: #687078; }
.analysis-facts strong { color: #11161a; font-size: 14px; }

.analysis-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d7d4cf;
  border-top-color: #d9302f;
  border-radius: 50%;
  animation: drawing-spin .8s linear infinite;
}

@keyframes drawing-spin { to { transform: rotate(360deg); } }

.analysis-candidates,
.analysis-text {
  border: 1px solid #d6d2cc;
  background: #fff;
}

.analysis-candidates summary,
.analysis-text summary { padding: 12px 14px; cursor: pointer; font-weight: 700; }

.candidate-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-top: 1px solid #ece9e4;
}

.candidate-row > span { overflow: hidden; color: #687078; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.candidate-row button { margin: 2px; border: 1px solid #c7c2bb; background: #fff; padding: 5px 8px; cursor: pointer; }
.candidate-row button:hover { border-color: #d9302f; color: #d9302f; }
.analysis-text p { max-height: 150px; overflow: auto; margin: 0; padding: 0 14px 14px; color: #4d565e; font-size: 12px; }

.drawing-file-name {
  display: grid;
  gap: 10px;
  max-width: 560px;
}

.drawing-fields { margin-top: 20px; }

.engineering-inputs {
  margin-top: 16px;
  border: 1px solid #d1ccc4;
  background: #f8f6f1;
}

.engineering-inputs summary {
  padding: 16px 18px;
  cursor: pointer;
  color: #20262b;
  font-weight: 750;
}

.engineering-inputs[open] summary {
  border-bottom: 1px solid #d1ccc4;
}

.engineering-inputs .drawing-fields {
  margin-top: 0;
  padding: 18px;
}

.drawing-primary-fields {
  padding: 16px;
  border-left: 3px solid #d9302f;
  background: #f3f0ea;
}

.brand-product strong {
  font-size: 15px;
}

.brand-product small {
  margin-top: 3px;
  color: #aeb6bc;
  font-size: 10px;
}

@media (max-width: 920px) {
  .brand-logo { width: 180px; }
  .brand-product { display: none; }
}

@media (max-width: 520px) {
  .brand-logo { width: 170px; }
  .drawing-upload { align-items: stretch; flex-direction: column; }
  .drawing-upload input { max-width: 100%; }
  .drawing-import-actions { flex-direction: column; }
  .drawing-demo-button { min-height: 46px; }
  .analysis-facts { grid-template-columns: 1fr; }
}
