.inspection-launch {
  margin-top: clamp(1.35rem, 2.5vw, 2.4rem);
  color: #fff;
  background: #222;
  border: 1px solid #787878;
  border-inline-start: 3px solid var(--race-red);
  font-family: var(--font-label);
}
.inspection-launch[hidden], .inspection-lens[hidden] { display: none; }
.inspection-launch:hover { background: #383838; color: #fff; }
.inspection {
  width: min(68rem, calc(100% - 1.25rem));
  max-width: none;
  max-height: calc(100dvh - 1rem);
  padding: 0;
  border: 1px solid #696969;
  border-top: 3px solid var(--race-red);
  background: var(--carbon);
  color: #fff;
  overscroll-behavior: contain;
}
.inspection::backdrop { background: rgb(0 0 0 / .82); }
.inspection-bar, .inspection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  padding: .6rem clamp(.65rem, 2vw, 1.5rem);
}
.inspection-bar h2 {
  font: 800 clamp(1.65rem, 4vw, 3.3rem)/1 var(--font-display);
  text-transform: uppercase;
}
.inspection-close {
  width: 44px;
  height: 44px;
  border: 1px solid #555;
  background: none;
  color: #fff;
  font: 400 1.65rem/1 var(--font-body);
  cursor: pointer;
}
.inspection-close:hover { background: #393939; color: #fff; }
.inspection-frame {
  position: relative;
  overflow: hidden;
  height: clamp(10rem, 59dvh, 42rem);
  touch-action: none;
  cursor: crosshair;
  user-select: none;
  background: #fff;
}
.inspection-frame img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.inspection-frame:focus-visible { outline: 3px solid var(--race-red-ink); outline-offset: -3px; }
.inspection-lens {
  position: absolute;
  inset: 0 auto auto 0;
  width: clamp(100px, 19vw, 210px);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--race-red-ink), 0 0 0 5px #171717, 0 8px 25px #0005;
  background: #fff no-repeat;
  pointer-events: none;
}
.inspection-lens::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #151515;
  font: 600 1.2rem/1 var(--font-label);
  text-shadow: 1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}
.inspection-toolbar { flex-wrap: wrap; }
.inspection-toolbar label {
  display: flex;
  align-items: center;
  gap: .5rem;
  font: 500 .8rem/1.2 var(--font-label);
}
.inspection-toolbar select {
  min-height: 44px;
  padding: .25rem .55rem;
  border: 1px solid #717171;
  border-radius: 0;
  color: #fff;
  background: #272727;
  font: inherit;
}
.inspection-toolbar input { width: clamp(5rem, 25vw, 12rem); min-height: 44px; accent-color: var(--race-red); }
.inspection-toolbar output { min-width: 2.6rem; color: #f3f3f3; }
.inspection-help { margin: 0; padding: 0 clamp(.65rem, 2vw, 1.5rem) .8rem; color: #c8c8c8; font-size: .78rem; }
.inspection :focus-visible { outline-color: #fff; }
.inspection .inspection-frame:focus-visible { outline-color: var(--race-red-ink); }
html:has(.inspection[open]) { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  .inspection[open] { animation: inspection-in .23s ease-out both; }
  @keyframes inspection-in {
    from { opacity: 0; translate: 0 10px; }
    to { opacity: 1; translate: 0 0; }
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .grid-hero-image { transform: scale(1.05) translate(var(--hero-x, 0%), var(--hero-y, 0%)); transition: transform .36s cubic-bezier(.2,.75,.25,1); }
}

@media (max-width: 560px) {
  .inspection-frame { height: clamp(10rem, 86vw, 48dvh); }
}
