/*
 * tool-focus-diagnostics.css — presentation-only refinements for the six
 * diagnostic tools. The shared tool-focus shell owns the common hero,
 * container, card and disclosure geometry; this file only tunes diagnostic
 * instruments and route-specific secondary content.
 */

/* Shared diagnostic-side neutralisation, scoped to the six owned routes. */
:is(
  .speaker-focus-page,
  .dead-pixel-focus-page,
  .refresh-rate-focus-page,
  .battery-focus-page,
  .network-focus-page,
  .interview-focus-page
) .vtile {
  min-width: 0;
  background: var(--surface);
  border-width: 1px;
  box-shadow: none;
}

:is(
  .speaker-focus-page,
  .dead-pixel-focus-page,
  .refresh-rate-focus-page,
  .battery-focus-page,
  .network-focus-page,
  .interview-focus-page
) .btn,
:is(
  .speaker-focus-page,
  .dead-pixel-focus-page,
  .refresh-rate-focus-page,
  .battery-focus-page,
  .network-focus-page,
  .interview-focus-page
) select {
  min-height: 44px;
}

/* Speaker --------------------------------------------------------------- */
.speaker-focus-page .speaker-stage {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.speaker-focus-page .speaker-pad {
  min-width: 0;
  min-height: 112px;
  padding: var(--space-4) var(--space-3);
  box-shadow: var(--sticker-sm);
}

.speaker-focus-page #output-block {
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.speaker-focus-page .speaker-controls {
  justify-content: flex-start;
}

.speaker-focus-page #stop-btn {
  flex: 0 0 auto;
}

.speaker-focus-page #sweep-btn {
  flex: 0 0 auto;
  min-width: 0;
}

.speaker-focus-page #hear-confirm[data-show="false"] {
  display: none;
}

.speaker-focus-page #hear-confirm[data-show="true"] {
  display: block;
}

.speaker-focus-page #advanced-details .focus-details-body {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.speaker-focus-page #advanced-details .disclosure-note {
  flex: 1 1 28ch;
  min-width: 0;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

/* Dead pixels ----------------------------------------------------------- */
.dead-pixel-focus-page #swatch-row {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: var(--space-2);
}

.dead-pixel-focus-page .test-card > .action-row {
  padding: var(--space-1) var(--space-2);
}

.dead-pixel-focus-page .swatch {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  height: auto;
}

.dead-pixel-focus-page #advanced-details .focus-details-body {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.dead-pixel-focus-page #fix-warning {
  flex: 1 1 28ch;
  min-width: 0;
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-soft);
  background: var(--surface);
}

.dead-pixel-focus-page #fix-btn {
  flex: 0 0 auto;
}

.dead-pixel-focus-page .detail-list {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.dead-pixel-focus-page .detail-actions {
  margin: 0;
}

/* Refresh rate ---------------------------------------------------------- */
.refresh-rate-focus-page .rr-wavebox {
  min-width: 0;
  box-shadow: none;
}

.refresh-rate-focus-page .rr-row,
.refresh-rate-focus-page .rr-track {
  min-width: 0;
}

/* Battery --------------------------------------------------------------- */
.battery-focus-page .battery {
  display: grid;
  grid-template-columns: minmax(112px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
}

.battery-focus-page .battery-shell {
  width: 100%;
  height: 68px;
  box-shadow: none;
}

.battery-focus-page .battery-fill {
  min-width: 0;
}

/* Network --------------------------------------------------------------- */
.network-focus-page .network-primary-action {
  margin-bottom: var(--space-2);
}

.network-focus-page .network-primary-action .btn {
  flex: 0 0 auto;
}

.network-focus-page .net-inline-readings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.network-focus-page .compact-reading {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.network-focus-page .compact-reading span {
  color: var(--ink-dim);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.network-focus-page .compact-reading strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

/* Interview ------------------------------------------------------------- */
.interview-focus-page .interview {
  width: min(100%, 800px);
  max-width: 800px;
  min-width: 0;
}

.interview-focus-page .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.interview-focus-page .interview > #verdict {
  margin: 0 0 var(--space-4);
}

.interview-focus-page .step-card {
  min-width: 0;
  padding: var(--space-3);
  box-shadow: none;
}

.interview-focus-page .step-head,
.interview-focus-page .step-body {
  min-width: 0;
}

.interview-focus-page .step-head {
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.interview-focus-page .step-emoji {
  flex: none;
  font-size: 22px;
}

.interview-focus-page .step-title {
  font-size: 1rem;
}

.interview-focus-page .step-body {
  margin-top: var(--space-2);
}

.interview-focus-page .step-btn {
  min-width: 0;
  width: min(100%, 220px);
}

.interview-focus-page .cam-mini {
  width: 100%;
  max-width: 220px;
  min-height: 72px;
  aspect-ratio: 16 / 5;
  margin-bottom: var(--space-2);
}

.interview-focus-page .cam-mini[data-live="true"] {
  min-height: 120px;
  aspect-ratio: 16 / 10;
}

.interview-focus-page .step-card[data-step="speaker"] .action-row {
  gap: var(--space-2);
}

.interview-focus-page .step-card[data-step="speaker"] .action-row .btn {
  flex: 1 1 12ch;
  min-width: 0;
}

.interview-focus-page .step-status {
  min-width: 0;
  max-width: 50%;
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 600px) {
  .speaker-focus-page .speaker-stage {
    gap: var(--space-2);
  }

  .speaker-focus-page .speaker-pad {
    min-height: 96px;
    padding-inline: var(--space-2);
    font-size: 0.9rem;
  }

  .speaker-focus-page .speaker-pad .icon {
    width: 26px;
    height: 26px;
  }

  .dead-pixel-focus-page #swatch-row {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .battery-focus-page .battery {
    grid-template-columns: minmax(0, 1fr);
  }

  .battery-focus-page .battery-shell {
    width: min(100%, 220px);
  }

  .interview-focus-page .step-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .interview-focus-page .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .interview-focus-page .step-status {
    margin-left: auto;
    max-width: 60%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .speaker-focus-page .speaker-pad,
  .speaker-focus-page .vtile,
  .dead-pixel-focus-page .vtile,
  .refresh-rate-focus-page .vtile,
  .battery-focus-page .vtile,
  .network-focus-page .vtile,
  .interview-focus-page .vtile,
  .battery-focus-page .battery-fill {
    transition: none;
  }
}
