/* The camera and microphone test. Builds on styles.css, app.css and articles.css. */
.tool-page { max-width: 46rem; }
.tool-note { padding: .75rem 1rem; background: var(--brass-wash); border-left: 6px solid var(--brass); }
.tool-card {
  margin: 1.5rem 0 0; padding: 1.1rem 1.25rem 1.25rem;
  background: var(--card); border: 3px solid var(--ink); border-radius: 10px;
}
.tool-card h2 { margin-top: 0; }
.tool-card p { margin: 0 0 .9rem; }
.tool-card .btn { max-width: 100%; text-align: center; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: .75rem; margin: .25rem 0 0; }
.tool-card p.tool-buttons { margin-bottom: .9rem; }
.tool-question { margin-bottom: .5rem; }

/* The microphone level: a bar that fills from the left as the sound gets louder. */
.meter { height: 2rem; margin: 0 0 1rem; background: #fff; border: 3px solid var(--ink); border-radius: 8px; overflow: hidden; }
.meter-fill { height: 100%; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left center; }

/* The picture is shown like a mirror, as in a video call. */
.tool-video {
  display: block; width: 100%; max-width: 28rem; aspect-ratio: 4 / 3; margin: 0 0 .9rem;
  background: #000; object-fit: cover; border: 3px solid var(--ink); border-radius: 8px;
  transform: scaleX(-1);
}

.tool-result:empty, .tool-fail:empty { display: none; }
.tool-off { display: block; margin-top: .25rem; }
.tool-ok { font-weight: 700; color: var(--green-dark); font-size: 1.25rem; }
.tool-fail { margin-top: .5rem; padding: .85rem 1rem 0; background: var(--brass-wash); border-left: 6px solid var(--brass); }
.tool-fail ol, .tool-fail ul { margin: 0 0 .9rem; }
.tool-steps li + li { margin-top: .5rem; }
.tool-links { list-style: none; padding-left: 0; }
.tool-links li + li { margin-top: .5rem; }
.tool-summary:empty { display: none; }
.tool-summary { margin-top: 1.5rem; padding: 1rem 1.25rem; background: var(--green-wash); border: 3px solid var(--green); border-radius: 10px; }
.tool-summary p { margin: 0; font-weight: 700; color: var(--ink); }
.tool-more { margin-top: 2rem; }
.tool-card [hidden], .tool-page [hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .meter-fill { transition: transform .08s linear; }
}
@media (forced-colors: active) {
  .meter, .tool-video, .tool-card { border-color: CanvasText; }
  .meter-fill { background: Highlight; }
}
@media print { .tool-card .btn { display: none; } }
