vision-lab { display: block; width: 100%; min-width: 0; container-type: inline-size; }
.vl-shell {
  --vl-accent: var(--accent, #7d141d);
  --vl-dark: #1d1b1b;
  --vl-border: var(--rule, #b4aba4);
  --vl-muted: var(--muted, #605750);
  color: var(--ink, #202830);
  font: 400 15px/1.5 "Inter", "Segoe UI", sans-serif;
  text-align: left;
}
.vl-shell *, .vl-shell *::before, .vl-shell *::after { box-sizing: border-box; }
.vl-shell [hidden] { display: none !important; }
.vl-shell p, .vl-shell h3, .vl-shell h4, .vl-shell figure { margin: 0; }
.vl-heading { padding-bottom: 20px; }
.vl-backend, .vl-rank, .vl-score, .vl-frame figcaption { font-family: "IBM Plex Mono", Consolas, monospace; }
.vl-heading h3 { font-size: clamp(21px, 2.5vw, 27px); font-weight: 500; line-height: 1.2; letter-spacing: -.035em; }
.vl-heading p { margin-top: 7px; font-size: 13px; color: var(--vl-muted); max-width: 75ch; }
.vl-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.vl-input { min-width: 0; }
.vl-frame { background: var(--vl-dark); position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.vl-frame canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.vl-frame figcaption { position: absolute; inset: auto 0 0; padding: 12px 14px; background: #1d1b1bec; color: #e6edf3; font-size: 11px; overflow-wrap: anywhere; }
.vl-corner { position: absolute; inset: 14px; border: 1px solid #ffffff45; pointer-events: none; }
.vl-corner::before, .vl-corner::after { content: ""; position: absolute; width: 22px; height: 22px; border: 2px solid #c9e3a9; }
.vl-corner::before { inset: -1px auto auto -1px; border-right: 0; border-bottom: 0; }
.vl-corner::after { inset: auto -1px -1px auto; border-left: 0; border-top: 0; }
.vl-samples { padding: 0; margin: 17px 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.vl-samples legend { padding: 0; margin: 0 0 8px; font-size: 12px; color: var(--vl-muted); }
.vl-shell button { min-height: 44px; border: 1px solid var(--control-border, #897b72); border-radius: 5px; padding: 9px 12px; background: var(--panel, #fffcf9); color: inherit; font: 500 13px/1.35 "Inter", "Segoe UI", sans-serif; cursor: pointer; touch-action: manipulation; }
.vl-shell button:hover:not(:disabled) { border-color: var(--vl-accent); background: var(--hover, #e5dbd2); }
.vl-shell button:disabled { opacity: .5; cursor: default; }
.vl-shell button[aria-pressed="true"] { color: var(--on-action, #f4efea); border-color: var(--action, #7d141d); background: var(--action, #7d141d); }
.vl-shell button[aria-pressed="true"]:hover:not(:disabled) { border-color: var(--action-hover, #651019); background: var(--action-hover, #651019); }
.vl-shell button:focus-visible, .vl-shell input:focus-visible, .vl-shell summary:focus-visible, .vl-shell a:focus-visible { outline: 3px solid var(--focus, #215ca2); outline-offset: 4px; }
.vl-file { display: block; font-size: 13px; font-weight: 500; }
.vl-file input { display: block; font: 400 12px/1.5 "Inter", "Segoe UI", sans-serif; color: var(--vl-muted); background: var(--panel, #fffcf9); width: 100%; max-width: 100%; margin-top: 8px; border: 1px solid var(--control-border, #897b72); border-radius: 5px; padding: 4px; min-height: 44px; }
.vl-file input::file-selector-button { border: 0; border-radius: 3px; padding: 8px 10px; margin-right: 10px; background: var(--raised, #eee7e0); color: var(--ink, #202830); cursor: pointer; }
.vl-shell .vl-help { margin-top: 8px; font-size: 12px; line-height: 1.6; color: var(--vl-muted); }
.vl-inference { min-width: 0; padding: 22px; background: var(--panel, #fffcf9); }
.vl-output { min-width: 0; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--vl-border); }
.vl-output-head { display: flex; gap: 8px 15px; flex-wrap: wrap; justify-content: space-between; align-items: baseline; }
.vl-output-head h4 { font-size: 15px; font-weight: 600; }
.vl-backend { font-size: 11px; color: var(--vl-muted); }
.vl-results { padding: 12px 0; }
.vl-scores { width: 100%; padding: 0; margin: 0; list-style: none; }
.vl-scores li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 56px; gap: 7px 10px; padding: 13px 0; }
.vl-rank { font-size: 10px; color: var(--vl-muted); padding-top: 3px; }
.vl-label { overflow-wrap: anywhere; font-size: 14px; }
.vl-score { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.vl-scores li:first-child .vl-label, .vl-scores li:first-child .vl-score { color: var(--vl-accent); font-weight: 600; }
.vl-meter { grid-column: 2 / -1; height: 3px; background: var(--raised, #eee7e0); overflow: hidden; }
.vl-meter span { display: block; height: 100%; background: var(--vl-muted); transform-origin: left; }
.vl-scores li:first-child .vl-meter span { background: var(--vl-accent); }
.vl-shell .vl-confidence { font-size: 12px; line-height: 1.65; color: var(--vl-muted); }
.vl-status { margin-top: 12px; font-size: 13px; overflow-wrap: anywhere; }
.vl-progress { display: block; width: 100%; height: 6px; margin: 12px 0 0; accent-color: var(--vl-accent); }
.vl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.vl-shell .vl-primary { background: var(--action, #7d141d); color: var(--on-action, #f4efea); border-color: var(--action, #7d141d); font-weight: 650; }
.vl-shell .vl-primary:hover:not(:disabled) { background: var(--action-hover, #651019); border-color: var(--action-hover, #651019); }
.vl-shell .vl-download { font-size: 12px; line-height: 1.65; color: var(--vl-muted); margin-top: 12px; }
.vl-details { margin-top: 22px; padding: 14px 0; border-top: 1px solid var(--vl-border); color: var(--vl-muted); font-size: 12px; }
.vl-details summary { display: list-item; cursor: pointer; min-height: 44px; color: var(--ink, #202830); padding: 10px 0; }
.vl-details p { max-width: 90ch; line-height: 1.7; margin: 10px 0 12px; }
.vl-details a { display: inline-block; min-height: 44px; padding-block: 10px; color: var(--vl-accent); text-decoration: underline; text-underline-offset: .2em; margin-right: 20px; }
.vl-details span { display: inline-block; font-size: 11px; margin-top: 5px; }
@container (max-width: 700px) {
  .vl-workspace { grid-template-columns: 1fr; gap: 20px; }
}
@container (max-width: 450px) {
  .vl-inference { padding: 16px; }
  .vl-shell button { font-size: 12px; padding-inline: 10px; }
}
@media (forced-colors: active) {
  .vl-meter span { background: Highlight; }
  .vl-shell button { border-color: ButtonText; }
}
@media print { .vl-actions, .vl-file, .vl-samples, .vl-progress { display: none !important; } }
