.qa-studio-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.qa-studio-heading h3 { margin: 6px 0 8px; }
.qa-studio-heading p { margin: 0; max-width: 60ch; }
.qa-studio-badge {
  border: 1px solid #637d52;
  background: #213324;
  border-radius: 999px;
  color: #d7fac0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 8px 11px;
  white-space: nowrap;
}

.qa-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 222px), 1fr));
  gap: 15px;
  margin-top: 16px;
}

.qa-profile-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #45556c;
  border-radius: 17px;
  background: #151e2d;
}

/* Preview crops only the technical bottom 32px strip from a square
   309x309 QA portrait. The downloadable JPEG remains unchanged and marked.
   A visible fictional-character label stays immediately below the photo. */
.qa-profile-photo {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 309 / 277;
  overflow: hidden;
  background: #263248;
}
.qa-profile-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: #263248;
}
.qa-profile-photo-pack { aspect-ratio: 1; }

.qa-profile-body { padding: 15px; }
.qa-profile-body h4 { margin: 7px 0 5px; font-size: 19px; }
.qa-profile-body p { margin: 5px 0; color: #b8c8de; }
.qa-profile-email { overflow-wrap: anywhere; font-size: 12px; }
.qa-profile-ref { color: #d4ffbb; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.qa-profile-ref span { margin-left: 9px; color: #bfceeb; }
.qa-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.qa-profile-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  align-items: start;
  container-type: inline-size;
}
@container (min-width: 700px) {
  .qa-profile-card:only-child {
    display: grid;
    grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
    align-items: start;
  }
}
.qa-profile-body { padding: 16px; }
.qa-profile-body h4 { overflow-wrap: anywhere; }
.qa-profile-synthetic {
  display: inline-block; border: 1px solid #637d52;
  border-radius: 8px; padding: 5px 8px;
  font-size: 11px; font-weight: 800; color: #d7fac0 !important;
  background: #213324; letter-spacing: .025em;
}
.qa-profile-location { font-weight: 600; }
.qa-profile-facts {
  display: grid; gap: 9px; padding: 12px 0;
  margin: 12px 0 0; border-top: 1px solid #45556c;
  border-bottom: 1px solid #45556c;
}
.qa-profile-facts div { min-width: 0; }
.qa-profile-facts dt {
  color: #a9bbd2; font-size: 11px;
  font-weight: 750; text-transform: uppercase; letter-spacing: .055em;
}
.qa-profile-facts dd {
  color: #eff5ff; font-size: 13px;
  margin: 3px 0 0; overflow-wrap: anywhere; line-height: 1.45;
}
.qa-profile-bio-title {
  margin: 13px 0 6px; color: #d4ffbb;
  font-size: 12px; font-weight: 800;
}
.qa-profile-bio { color: #d6e2f3 !important; line-height: 1.55; font-size: 13px; }


.qa-profile-actions .btn { font-size: 12px; padding: 7px 10px; text-decoration: none; }
.qa-profile-actions > .qa-profile-synthetic { align-self: center; }
.qa-profile-media { margin-top: 16px; padding-top: 12px; border-top: 1px solid #45556c; }
.qa-profile-download-head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 6px; margin-bottom: 9px;
}
.qa-profile-download-head h5 { color: #e1f2cd; font-size: 13px; margin: 0; }
.qa-profile-media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.qa-profile-media-grid figure { min-width: 0; margin: 0; }
.qa-profile-media-grid img { display: block; width: 100%; height: auto; border-radius: 8px; background: #263248; }
.qa-profile-media-grid button { width: 100%; margin-top: 5px; padding: 6px 4px; font-size: 12px; }
.qa-profile-media .status-text:empty { display: none; }
.qa-profile-address { grid-column: 1 / -1; overflow-wrap: anywhere; }
.qa-profile-posts { margin-top: 12px; border-top: 1px solid #45556c; padding-top: 10px; }
.qa-profile-posts summary { cursor: pointer; color: #e1f2cd; font-size: 13px; font-weight: 700; }
.qa-profile-posts ol { margin: 8px 0 0; padding: 0; list-style: none; }
.qa-profile-posts li { padding: 9px 0; border-top: 1px solid #334458; }
.qa-profile-posts li p { font-size: 13px; line-height: 1.5; }
.qa-profile-posts .btn { font-size: 12px; padding: 6px 9px; }

.qa-document-card {
  background: linear-gradient(150deg, #1c2b2a, #151c2b 70%);
  border-color: #48644b;
}

.qa-document-card [hidden] { display: none; }
.qa-card-wizard { border-top: 1px solid #48644b; padding-top: 14px; }
.qa-card-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.qa-card-steps li {
  border: 1px solid #4a5b61;
  border-radius: 8px;
  color: #b7c9c9;
  padding: 9px 10px;
  font-size: 13px;
}
.qa-card-steps li span { font-variant-numeric: tabular-nums; opacity: .7; margin-right: 4px; }
.qa-card-steps li[aria-current='step'] { border-color: #a6e782; background: #293f33; color: #edffdf; font-weight: 750; }
.qa-wizard-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qa-wizard-heading h4 { margin: 0; font-size: 18px; }
.qa-card-region { border: 1px solid #567866; border-radius: 8px; padding: 5px 8px; color: #dcf6d1; font-size: 12px; }
.qa-card-stage { min-width: 0; }
.qa-card-stage input[type='file'] { max-width: 100%; }
.qa-wizard-actions { gap: 8px; }

.qa-card-manual {
  min-width: 0;
  margin: 4px 0 0;
  padding: 12px;
  border: 1px solid #45604e;
  border-radius: 12px;
}

.qa-card-manual legend { padding: 0 6px; color: #d2edc0; font-weight: 650; }

.qa-card-preview {
  margin: 16px 0 0;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid #45556c;
  background: #111827;
}

.qa-card-preview[hidden] { display: none; }
.qa-card-preview img { width: 100%; height: auto; display: block; border-radius: 10px; }
.qa-card-preview .btnrow { padding: 8px 2px 1px; }
.qa-card-preview .btn { text-decoration: none; }

@media (max-width: 520px) {
  .qa-studio-heading { flex-direction: column-reverse; gap: 10px; }
  .qa-profile-grid { grid-template-columns: 1fr; }
  .qa-card-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
