/* QR code reader. Tokens, header, footer and the drop zone come from the site stylesheet. */
.intro h1 { font-size: 22px; margin: 0 0 12px; }
/* The blocks below set their own display, which would otherwise beat the hidden attribute. */
main [hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.status { min-height: 1.45em; margin: 12px 0 0; font-size: 14px; text-align: center; }
.status.ok { color: var(--ok); }
.status.error { color: var(--err); }

.decoded { display: flex; gap: 16px; align-items: flex-start; margin: 14px 0 16px; }
.shot { width: 140px; max-height: 180px; object-fit: contain; flex: none; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.decoded-body { flex: 1; min-width: 0; }
#decoded {
  display: block; width: 100%; resize: vertical; padding: 8px 10px;
  font: 13px/1.5 var(--mono); border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); color: var(--text); overflow-wrap: anywhere;
}
.info { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 10px; }
.info dt { color: var(--muted); }
.info dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.info dd.mono { font-family: var(--mono); font-weight: 500; }
.otp-now { margin: 0 0 10px; font-size: 14px; }

/* Live 2FA code: the seconds left inside a ring that drains over the period, amber for the
   last 5 seconds, then the code (totp.js). */
.otp-live { display: flex; align-items: center; gap: 10px; }
.otp-timer { position: relative; width: 38px; height: 38px; flex: none; }
.otp-ring { width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
.otp-secs {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text);
}
.otp-live.ending .otp-secs { color: #c27c00; }
.otp-ring circle { fill: none; stroke-width: 4; }
.otp-track { stroke: var(--line); }
.otp-fill { stroke: var(--accent); stroke-dasharray: 100; stroke-linecap: round; transition: stroke .3s; }
.otp-live.ending .otp-fill { stroke: #e8a317; }
.otp-code { display: inline-block; font-family: var(--mono); font-size: 18px; letter-spacing: .04em; }
.otp-code span + span { margin-left: .3em; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.actions button, .btn { padding: 8px 14px; font-size: 15px; }
.btn {
  display: inline-block; border-radius: 6px; border: 1px solid var(--line);
  background: var(--head); color: var(--text); text-decoration: none;
}
.primary { background: var(--accent); color: #fff; border-color: transparent; font-weight: 600; }

@media (max-width: 560px) {
  .decoded { flex-direction: column; }
  .shot { width: 100%; max-height: 220px; }
}
