.emt-artifact-lab {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid rgba(85, 214, 190, 0.34);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(85, 214, 190, 0.1), transparent 45%), #101c28;
  color: var(--text);
}
.emt-artifact-lab [hidden] { display: none !important; }
.emt-artifact-head { display: grid; justify-items: start; gap: 7px; }
.emt-artifact-head h3 { margin: 0; font-size: 1.17rem; }
.emt-artifact-head p,
.emt-artifact-guide,
.emt-artifact-bedside p,
.emt-artifact-photo p,
.emt-artifact-sources > p,
.emt-artifact-quality,
.emt-artifact-filter-limit,
.emt-artifact-comparison,
.emt-artifact-handoff > p,
.emt-artifact-safety,
.emt-artifact-references { margin: 0; color: #c5d4dd; line-height: 1.5; }
.emt-artifact-head p { max-width: 87ch; }
.emt-artifact-guide { padding: 10px 13px; border-left: 3px solid #6fb6ff; background: rgba(111, 182, 255, 0.08); font-size: 0.79rem; }
.emt-artifact-lab button { min-height: 36px; }
.emt-artifact-lab :is(button, input):focus-visible { outline: 2px solid #a8eaff; outline-offset: 3px; }
.emt-artifact-lab button:disabled { opacity: 0.5; cursor: not-allowed; }

.emt-artifact-bedside {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 15px;
  border: 1px solid rgba(111, 182, 255, 0.29);
  border-radius: 8px;
  background: radial-gradient(circle at 0 50%, rgba(111, 182, 255, 0.12), transparent 40%), #0b1824;
}
.emt-artifact-kicker { color: #94bcd0; font-size: 0.67rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.emt-artifact-bedside h4 { margin: 3px 0 6px; font-size: 0.93rem; }
.emt-artifact-bedside p { max-width: 85ch; font-size: 0.78rem; }
.emt-artifact-bedside-actions { display: grid; gap: 5px; justify-items: start; }
.emt-artifact-bedside-actions span { color: #9fb9c6; font-size: 0.71rem; }

.emt-artifact-photo { display: grid; gap: 10px; min-width: 0; padding: 15px; border: 1px solid rgba(111, 182, 255, 0.34); border-radius: 9px; background: #0b1824; }
.emt-artifact-photo h4, .emt-artifact-photo h5 { margin: 0; }
.emt-artifact-photo h4 { font-size: 1rem; }
.emt-artifact-photo h5 { font-size: .79rem; color: #d9e9ee; }
.emt-artifact-photo-intro, .emt-artifact-photo-feedback, .emt-artifact-photo-result { font-size: .77rem; line-height: 1.48; }
.emt-artifact-photo-figure { margin: 0; min-width: 0; overflow: hidden; border: 1px solid rgba(111, 182, 255, 0.32); border-radius: 8px; background: #07141e; }
.emt-artifact-photo-figure img { display: block; width: 100%; max-height: 350px; object-fit: contain; }
.emt-artifact-photo-figure figcaption { padding: 8px 10px; color: #bfd3dd; font-size: .7rem; line-height: 1.4; }
.emt-artifact-photo-detail { display: none; margin: 0; min-width: 0; overflow: hidden; border: 1px solid rgba(111, 182, 255, .32); border-radius: 8px; }
.emt-artifact-photo-detail-window { overflow: hidden; aspect-ratio: .75; }
.emt-artifact-photo-detail img { display: block; width: 300%; max-width: none; height: auto; }
.emt-artifact-photo-detail figcaption { padding: 8px 10px; color: #bfd3dd; font-size: .7rem; line-height: 1.4; }
.emt-artifact-photo-choices, .emt-artifact-photo-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.emt-artifact-photo-choices button { max-width: 100%; white-space: normal; text-align: left; font-size: .73rem; }
.emt-artifact-photo-choices button[aria-pressed="true"] { border-color: #9be2d3; color: #e6fff8; background: #234f50; }
.emt-artifact-photo-feedback, .emt-artifact-photo-result { padding: 8px 10px; border-left: 3px solid #7dbbd2; background: rgba(111, 182, 255, .08); }
.emt-artifact-photo-result { border-left-color: #8fdec7; }
.emt-artifact-photo-repair img { max-height: 280px; }

.emt-artifact-sources,
.emt-artifact-live,
.emt-artifact-compare,
.emt-artifact-handoff { display: grid; gap: 10px; }
.emt-artifact-sources h4,
.emt-artifact-live h4,
.emt-artifact-compare h4,
.emt-artifact-handoff h4 { margin: 0; font-size: 0.95rem; }
.emt-artifact-sources > p,
.emt-artifact-quality,
.emt-artifact-filter-limit,
.emt-artifact-comparison,
.emt-artifact-handoff > p { font-size: 0.78rem; }
.emt-artifact-fault-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.emt-artifact-fault-card {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(4, 13, 22, 0.5);
}
.emt-artifact-fault-card[data-active="true"] { border-color: rgba(232, 165, 113, 0.64); background: rgba(232, 165, 113, 0.07); }
.emt-artifact-fault-toggle { display: flex; align-items: center; gap: 8px; color: #e7f0f2; font-size: 0.82rem; cursor: pointer; }
.emt-artifact-fault-toggle input { width: 16px; height: 16px; accent-color: #e8a571; }
.emt-artifact-fault-card p { margin: 0; min-height: 44px; color: #b6c8d0; font-size: 0.74rem; line-height: 1.45; }
.emt-artifact-fault-card button { justify-self: start; min-height: 32px; padding: 5px 9px; font-size: 0.72rem; }

.emt-artifact-live { padding: 14px; border: 1px solid rgba(85, 214, 190, 0.26); border-radius: 8px; background: rgba(4, 13, 22, 0.45); }
.emt-artifact-section-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.emt-artifact-smoothing { display: flex; gap: 8px; align-items: center; color: #d8e7e8; font-size: 0.75rem; font-weight: 750; cursor: pointer; }
.emt-artifact-smoothing input { accent-color: #55d6be; }
.emt-artifact-scope {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(85, 214, 190, 0.29);
  border-radius: 6px;
  background: repeating-linear-gradient(90deg, rgba(85, 214, 190, 0.04) 0 1px, transparent 1px 20px),
    repeating-linear-gradient(0deg, rgba(85, 214, 190, 0.04) 0 1px, transparent 1px 20px), #071822;
}
.emt-artifact-scope-labels { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; color: #9bdad4; font-size: 0.68rem; font-weight: 800; }
.emt-artifact-scope-labels span:last-child { color: #94c8ed; }
.emt-artifact-scope svg { display: block; width: 100%; min-width: 0; height: 160px; }
.emt-artifact-scope path { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.emt-artifact-trace-lead { stroke: #55d6be; }
.emt-artifact-trace-v2 { stroke: #79baf0; }
.emt-artifact-filter-limit { padding: 9px 11px; border-left: 3px solid #e8a571; background: rgba(232, 165, 113, 0.08); }

.emt-artifact-capture-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.emt-artifact-capture-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.emt-artifact-capture-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 13px;
  border: 1px solid rgba(111, 182, 255, 0.28);
  border-radius: 8px;
  background: rgba(4, 13, 22, 0.48);
}
.emt-artifact-capture-card h5 { margin: 0; font-size: 0.86rem; }
.emt-artifact-time { color: #94d7ee; font-size: 0.73rem; font-weight: 800; }
.emt-artifact-capture-card .emt-artifact-scope { grid-template-columns: 1fr; gap: 4px; padding: 6px; }
.emt-artifact-capture-card .emt-artifact-scope-labels { flex-direction: row; justify-content: space-between; font-size: 0.59rem; }
.emt-artifact-capture-card .emt-artifact-scope svg { height: 100px; }
.emt-artifact-capture-card .emt-artifact-scope path { stroke-width: 3; }
.emt-artifact-capture-quality,
.emt-artifact-missing { margin: 0; color: #c7d8df; font-size: 0.73rem; line-height: 1.45; }
.emt-artifact-missing { color: #98b5c2; }
.emt-artifact-comparison { padding: 10px 12px; border-left: 3px solid #55d6be; background: rgba(85, 214, 190, 0.07); }

.emt-artifact-handoff { padding: 14px; border: 1px solid rgba(111, 182, 255, 0.26); border-radius: 8px; background: rgba(111, 182, 255, 0.06); }
.emt-artifact-handoff-list { display: grid; gap: 7px; margin: 0; padding-left: 20px; }
.emt-artifact-handoff-list li { padding-left: 3px; color: #d7e5e9; font-size: 0.76rem; line-height: 1.45; }
.emt-artifact-handoff-list strong { display: block; color: #94e5d5; font-size: 0.7rem; }
.emt-artifact-handoff-list span { display: block; }
.emt-artifact-safety { font-size: 0.78rem; }
.emt-artifact-references { font-size: 0.72rem; }
.emt-artifact-references a { color: #96e8dc; }
.emt-artifact-live-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 920px) {
  .emt-artifact-fault-grid { grid-template-columns: 1fr; }
  .emt-artifact-fault-card p { min-height: 0; }
}
@media (max-width: 680px) {
  .emt-artifact-lab { padding: 14px; }
  .emt-artifact-photo { padding: 11px; }
  .emt-artifact-photo-detail { display: block; }
  .emt-artifact-photo-choices { display: grid; grid-template-columns: 1fr; }
  .emt-artifact-photo-figure img { max-height: none; }
  .emt-artifact-bedside,
  .emt-artifact-capture-grid { grid-template-columns: 1fr; }
  .emt-artifact-scope { grid-template-columns: 1fr; }
  .emt-artifact-scope-labels { flex-direction: row; justify-content: space-between; }
  .emt-artifact-scope svg { height: 120px; }
}
