.fq-media { margin: 30px 0 36px; }
.fq-media figcaption {
  color: #aabed4;
  font-size: 13px;
  line-height: 1.55;
  margin-top: 10px;
}
.fq-video video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #071426;
  border-radius: 8px;
}
.fq-video.fq-overview video { aspect-ratio: 16 / 9; }
.fq-video-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 32px;
}
.fq-video-pair .fq-media { margin: 0; }

.fq-fold fieldset, .fq-chart {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid #28435c;
  border-radius: 8px;
  background: #0c1e30;
}
.fq-fold legend {
  padding: 0 7px;
  color: #f2f7ff;
  font-size: 16px;
  font-weight: 700;
}
.fq-fold input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.fq-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border-radius: 8px;
  background: #071524;
  padding: 4px;
}
.fq-steps label {
  display: grid;
  min-height: 40px;
  place-items: center;
  border-radius: 5px;
  color: #bfcee0;
  font-size: 14px;
  cursor: pointer;
}
#fq-input:checked ~ .fq-steps label[for="fq-input"],
#fq-scale:checked ~ .fq-steps label[for="fq-scale"],
#fq-rotate:checked ~ .fq-steps label[for="fq-rotate"] {
  background: #234760;
  color: #fff;
}
#fq-input:focus-visible ~ .fq-steps label[for="fq-input"],
#fq-scale:focus-visible ~ .fq-steps label[for="fq-scale"],
#fq-rotate:focus-visible ~ .fq-steps label[for="fq-rotate"] {
  outline: 2px solid #9fe3ff;
  outline-offset: 2px;
}
.fq-fold-bars {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 18px 0 14px;
  color: #aabed4;
  font: 14px 'DM Mono', monospace;
}
.fq-track { height: 8px; border-radius: 3px; background: #1c3247; }
.fq-bar { display: block; height: 100%; width: var(--bar); border-radius: inherit; }
.fq-fold-bars .fq-track { height: 13px; }
.fq-fold-bars .fq-bar { transition: width .4s cubic-bezier(.25, .75, .3, 1); }
.fq-channel-one { --bar: 100%; background: #f3a075; }
.fq-channel-two { --bar: 25%; background: #78d9c4; }
#fq-scale:checked ~ .fq-fold-bars .fq-channel-one { --bar: 50%; }
#fq-rotate:checked ~ .fq-fold-bars .fq-channel-one { --bar: 53.03%; }
#fq-rotate:checked ~ .fq-fold-bars .fq-channel-two { --bar: 17.68%; }
.fq-fold-values { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.fq-fold-values strong { color: #88e4cb; white-space: nowrap; font: 500 15px 'DM Mono', monospace; }
.fq-formula { display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fq-formula code { display: block; padding: 5px 7px; overflow-wrap: anywhere; font-size: 13px; }
#fq-input:checked ~ .fq-fold-values .fq-formula-input,
#fq-scale:checked ~ .fq-fold-values .fq-formula-scale,
#fq-rotate:checked ~ .fq-fold-values .fq-formula-rotate { display: grid; }

.fq-chart-head { margin-bottom: 14px; }
.fq-chart-head h3 { margin: 0; font-size: 17px; color: #f2f7ff; }
.fq-chart-head span { font-size: 13px; color: #aabed4; }
.fq-chart-metrics, .fq-chart-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
}
.fq-chart-metrics { font-size: 12px; color: #aabed4; }
.fq-chart-row { border-top: 1px solid #294257; }
.fq-chart-row strong, .fq-metric { font-size: 13px; line-height: 1.4; }
.fq-metric span { display: block; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.fq-latency { background: #87c7fa; }
.fq-success { background: #f3a075; }
.fq-chart-highlight { border-radius: 0 0 5px 5px; background: #183548; }
.fq-chart-highlight .fq-success { background: #78d9c4; }

@media (max-width: 480px) {
  .fq-video-pair { grid-template-columns: minmax(0, 1fr); }
  .fq-fold fieldset, .fq-chart { padding: 12px; }
  .fq-formula { grid-template-columns: minmax(0, 1fr); }
  .fq-fold-values { min-height: 78px; }
  .fq-chart-row, .fq-chart-metrics { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .fq-fold-bars .fq-bar { transition: none; }
}
