/* Component inspection and source-derived assembly views. */
.lh-cad-library {
  padding: clamp(42px, 6vw, 96px) clamp(20px, 6vw, 120px);
  background: #10171d;
  color: #f4f6f7;
}
.lh-cad-library > header {
  width: min(100%, 1150px);
  margin: 0 auto 30px;
}
.lh6 .lh-cad-inspection > header {
  max-width: 1150px;
  text-align: left;
  margin-inline: auto;
}
.lh-cad-library h2 {
  margin: 0 0 16px;
  color: inherit;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.06;
  letter-spacing: -.035em;
}
.lh-cad-library header p { max-width: 55ch; }
.lh-cad-inspection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(330px, 100%), 1fr));
  gap: 16px;
  width: min(100%, 1150px);
  margin-inline: auto;
}
.lh-cad-inspection-card {
  display: grid;
  grid-template-columns: minmax(130px, .8fr) 1fr;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  background: #18242c;
  border: 1px solid #364750;
  border-radius: 18px;
  padding: 22px;
  width: min(100%, 1150px);
  margin-inline: auto;
  box-sizing: border-box;
}
.lh-cad-inspection-card img {
  display: block;
  width: 100%;
  height: clamp(130px, 25vw, 270px);
  object-fit: contain;
}
.lh-cad-inspection-card h3 {
  margin: 0 0 12px;
  color: #f4f6f7;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1.1;
  text-wrap: balance;
}
.lh-cad-inspection-card p { margin: 0 0 18px; color: #c9d3d8; line-height: 1.55; }
.lh-cad-library .lh-cad-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid #edaa78;
  padding: 10px 17px;
  background: #edaa78;
  color: #14212a;
  font: 700 15px/1.3 system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.lh-cad-library .lh-cad-action:hover { background: #f5c195; }
.lh-cad-library button.lh-cad-action:disabled { opacity: .65; cursor: wait; }
.lh-cad-library .lh-cad-patent-link {
  display: inline-block;
  margin: 12px 0 0 14px;
  color: #e7edf0;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.lh-cad-source-study .lh-cad-inspection-card img { filter: invert(.85); mix-blend-mode: screen; }
.lh-cad-dialog {
  width: min(980px, calc(100% - 28px));
  max-height: min(92dvh, 920px);
  padding: 0;
  border: 1px solid #526571;
  border-radius: 18px;
  color: #edf2f4;
  background: #10171d;
  overflow: auto;
  box-sizing: border-box;
}
.lh-cad-dialog::backdrop { background: #080c10d9; }
.lh-cad-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px;
  background: #10171d;
  border-bottom: 1px solid #34434f;
}
.lh-cad-dialog .lh-cad-toolbar h2 {
  font: 750 clamp(20px, 3vw, 28px)/1.15 system-ui, sans-serif;
  margin: 0;
  color: inherit;
  text-transform: none;
}
.lh-cad-viewer {
  position: relative;
  height: clamp(215px, 43dvh, 510px);
}
.lh-cad-viewer > img,.lh-cad-assembly-art > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lh-cad-viewer [hidden],.lh-cad-assembly [hidden],.lh-cad-dialog [hidden] { display: none !important; }
.lh-cad-surface { position: absolute; inset: 0; }
.lh-cad-surface .lhil-model-poster { display: none !important; }
.lh-cad-viewer .lhil-model-status,.lh-cad-assembly .lhil-model-status { display: none; }
.lh-cad-controls { padding: 8px 24px 20px; }
.lh-cad-variants { margin-bottom: 16px; }
.lh-cad-variants p { font-size: 13px; color: #b9c7cf; margin: 0 0 8px; }
.lh-cad-variants [role=group],.lh-cad-motion,.lh-cad-assembly-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.lh-cad-dialog button,.lh6 .lh-cad-assembly-controls button {
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 8px;
  border: 1px solid #667c8a;
  background: transparent;
  color: #f2f5f6;
  font: 650 14px/1.25 system-ui, sans-serif;
  cursor: pointer;
}
.lh-cad-dialog button[aria-pressed=true],.lh6 .lh-cad-assembly-controls button[aria-pressed=true] {
  color: #151e25;
  background: #edaa78;
  border-color: #edaa78;
}
.lh-cad-variants button[aria-pressed=true] {
  color: #ffe0c3;
  background: #563b2d;
  border-color: #edaa78;
}
.lh-cad-motion { padding-top: 12px; border-top: 1px solid #34434f; }
.lh-cad-caption { color: #edf2f4; font-size: 16px; max-width: 70ch; margin: 12px 0 6px; }
.lh-cad-utility { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; color: #b9c7cf; font-size: 13px; }
.lh-cad-utility p { margin: 0; }
.lh-cad-utility [data-cad-reset] { border: 0; text-decoration: underline; text-underline-offset: .22em; }
.lh-cad-library button:focus-visible,.lh-cad-assembly button:focus-visible,.lh-cad-dialog button:focus-visible {
  outline: 2px solid #b5ddee;
  outline-offset: 3px;
}
.lh-cad-assembly {
  margin-inline: auto;
  background: #10171d;
  color: #f4f6f7;
}
.lh-cad-assembly-stage {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px 18px 26px;
  box-sizing: border-box;
}
.lh-cad-assembly-art {
  position: relative;
  height: clamp(285px, 59svh, 640px);
  width: min(100%, 960px);
}
.lh-cad-assembly-controls { justify-content: center; padding: 10px 0 0; }
.lh-cad-assembly.is-scroll-story::after { content: ""; display: block; height: 58svh; }
.lh-cad-assembly.is-scroll-story .lh-cad-assembly-stage {
  position: sticky;
  top: var(--theme-offset,0px);
}
.wp-admin .lh-cad-library { margin-bottom: 25px; }
@media(max-width:760px) {
  .lh-cad-assembly-art { height: auto; aspect-ratio: 5 / 4; }
}
@media(max-width:650px) {
  .lh-cad-inspection-card { grid-template-columns: 1fr; gap: 10px; }
  .lh-cad-inspection-card img { height: 200px; }
  .lh-cad-toolbar,.lh-cad-controls { padding-inline: 15px; }
  .lh-cad-viewer { height: 37dvh; }
}
