/* Blink rate test — the tool block at the top of /blink-rate-test.
   Sits inside .hero on blog-style.css, same palette. */

.brt-hero {
  padding-bottom: 3rem;
}

.brt {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.75rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 69, 96, 0.28);
  border-radius: 16px;
  text-align: center;
}

.brt-step[hidden] {
  display: none;
}

.brt-question {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.brt-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.brt-mode {
  cursor: pointer;
}

.brt-mode input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.brt-mode-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  padding: 0.9rem 0.8rem;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.brt-mode:hover .brt-mode-card {
  border-color: rgba(233, 69, 96, 0.5);
}

.brt-mode input:checked + .brt-mode-card {
  border-color: #e94560;
  background: rgba(233, 69, 96, 0.1);
}

.brt-mode input:focus-visible + .brt-mode-card {
  outline: 2px solid #ffd700;
  outline-offset: 2px;
}

.brt-mode-name {
  font-weight: 700;
  color: #fff;
}

.brt-mode-hint {
  font-size: 0.85rem;
  line-height: 1.4;
  color: #a8a8be;
}

.brt-start {
  font-size: 1.1rem;
  padding: 0.9rem 2.2rem;
}

.brt-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: #8b8b9e;
}

/* Running */
.brt-run-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.25rem;
  align-items: center;
  text-align: left;
}

.brt-cam {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d1a;
}

.brt-cam video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.brt-status {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 9px 3px 20px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
}

.brt-status::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #ffd700;
}

.brt-status[data-state="ok"]::before { background: #00ff64; }
.brt-status[data-state="lost"]::before { background: #e94560; }

.brt-clock {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.brt-clock-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  color: #ffd700;
  font-variant-numeric: tabular-nums;
}

.brt-clock-label {
  color: #8b8b9e;
  font-size: 0.9rem;
}

.brt-progress {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.brt-progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #e94560, #ffd700);
  transition: width 0.25s linear;
}

.brt-instruction {
  color: #d8d8e2;
  line-height: 1.55;
}

.brt-reading {
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: 12px;
  background: #f4f1ea;
  color: #1f1f2a;
  text-align: left;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  line-height: 1.75;
}

.brt-reading h2 {
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
  color: #1f1f2a;
}

.brt-reading p + p {
  margin-top: 0.9rem;
}

/* Result */
.brt-result-label {
  color: #8b8b9e;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.brt-result-value {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0.25rem 0 0.4rem;
}

#brt-rate {
  font-size: 4.2rem;
  font-weight: 900;
  line-height: 1;
  color: #e94560;
  font-variant-numeric: tabular-nums;
}

.brt-result-unit {
  font-size: 1.1rem;
  color: #d8d8e2;
  font-weight: 600;
}

.brt-result-detail {
  color: #a8a8be;
  font-size: 0.95rem;
}

.brt-compare {
  display: table;
  max-width: 560px;
  margin: 1.25rem auto;
  text-align: left;
}

.brt-compare th,
.brt-compare td {
  white-space: normal;
}

.brt-compare tr.brt-you th,
.brt-compare tr.brt-you .stat-num {
  color: #ffd700;
  font-weight: 800;
}

.brt-compare tr.brt-you .stat-bar {
  background: #ffd700;
}

.brt-verdict {
  max-width: 560px;
  margin: 0 auto 1.25rem;
  color: #fff;
  line-height: 1.6;
}

.brt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brt-game-link {
  font-weight: 600;
}

.brt-disclaimer {
  max-width: 760px;
  margin: 1rem auto 0;
  font-size: 0.8rem;
  color: #6b6b7e;
}

/* camera-help.js markup, restyled for the article pages */
.brt .camera-help {
  max-width: 460px;
  margin: 0 auto;
}

.camera-help-icon { font-size: 2.4rem; margin-bottom: 0.5rem; }
.camera-help-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.6rem; }
.camera-help-body { color: #d8d8e2; line-height: 1.55; margin-bottom: 1.1rem; }
.camera-help-qr { width: 180px; height: 180px; margin: 0 auto 0.4rem; border-radius: 10px; overflow: hidden; background: #fff; }
.camera-help-qr svg { display: block; width: 100%; height: 100%; }
.camera-help-qr-label { color: #8b8b9e; font-size: 0.85rem; margin-bottom: 1rem; }
.camera-help-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.brt .btn-share {
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.brt .btn-share.copied { background: #00ff64; color: #000; }
.camera-help-privacy { color: #8b8b9e; font-size: 0.8rem; }

@media (max-width: 700px) {
  .brt { padding: 1.1rem; }
  .brt-modes { grid-template-columns: 1fr; }
  .brt-run-grid { grid-template-columns: 1fr; }
  .brt-cam { max-width: 220px; margin: 0 auto; }
  .brt-clock { justify-content: center; }
  .brt-instruction { text-align: center; }
  .brt-reading { padding: 1.1rem 1.1rem; font-size: 1.02rem; }
  #brt-rate { font-size: 3.4rem; }
}
