
.hk-stop {
  --hk-bg: #1c2022;
  --hk-panel: #262b2d;
  --hk-ink: #ece4d2;
  --hk-muted: #a7a191;
  --hk-line: #4b5254;
  --hk-gold: #e3a72f;
  --hk-gold-ink: #f0c25a;
  --hk-on-gold: #2a1c04;
  --hk-good: #7cc58a;
  --hk-bad: #ff8b72;
  --hk-info: #9cc7cf;
  --hk-paper: #e8dab7;
  --hk-paper-ink: #201d17;
  --hk-radius: 0.5rem;
  --hk-body: "Atkinson Hyperlegible", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --hk-display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --hk-mono: "Courier Prime", "Courier New", Courier, monospace;

  position: relative;
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 1.2rem; border-radius: var(--hk-radius);
  background: linear-gradient(180deg, #2b3133, var(--hk-bg));
  border: 1px solid var(--hk-line);
  color: var(--hk-ink); font-family: var(--hk-body); line-height: 1.5;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}
.hk-stop *, .hk-stop *::before, .hk-stop *::after { box-sizing: border-box; }
.hk-stop [hidden] { display: none !important; }
.hk-stop p { margin: 0; }
.hk-head { display: flex; flex-direction: column; gap: 0.2rem; }
.hk-kicker { font-family: var(--hk-mono); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hk-gold-ink); }
.hk-title { margin: 0; font-family: var(--hk-display); font-weight: 800; text-transform: uppercase; font-size: 1.6rem; line-height: 1.05; letter-spacing: 0.02em; }
.hk-prompt { display: flex; flex-direction: column; gap: 0.6rem; color: var(--hk-ink); }
.hk-body { display: flex; flex-direction: column; gap: 0.8rem; min-width: 0; }
.hk-feedback { min-height: 1.5em; font-weight: 700; font-size: 0.98rem; }
.hk-feedback:empty { min-height: 0; }
.hk-feedback.hk-wrong { color: var(--hk-bad); }
.hk-feedback.hk-good { color: var(--hk-good); }
.hk-feedback.hk-info { color: var(--hk-info); }
.hk-hints { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.35rem; font-family: var(--hk-mono); font-size: 0.95rem; color: var(--hk-gold-ink); }
.hk-hints:empty { display: none; }
.hk-foot { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hk-foot:not(:has(button:not([hidden]))) { display: none; }
.hk-solved { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.9rem 1rem; border-radius: var(--hk-radius); background: rgba(124, 197, 138, 0.1); border: 1.5px solid var(--hk-good); outline: none; }
.hk-solved-mark { font-family: var(--hk-display); font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hk-good); font-size: 1.2rem; }
.hk-is-solved .hk-body { opacity: 0.85; }


.hk-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 2.9rem; padding: 0.55rem 1.1rem; border-radius: 0.45rem; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--hk-ink); text-decoration: none;
  border: 1.5px solid #6c7273; background: linear-gradient(180deg, #353c3e, #1f2325);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 3px 8px rgba(0, 0, 0, 0.35);
  touch-action: manipulation;
}
.hk-btn:hover { border-color: var(--hk-gold); }
.hk-btn:disabled { opacity: 0.5; cursor: default; }
.hk-btn.hk-primary { color: var(--hk-on-gold); border-color: #6b4d10; background: linear-gradient(180deg, #f6d878 0%, #e4b03c 45%, #c48e1f 100%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 -2px 0 rgba(90, 60, 5, 0.45) inset, 0 4px 10px rgba(0, 0, 0, 0.4); }
.hk-btn.hk-ghost { min-height: 2.5rem; padding: 0.35rem 0.9rem; font-size: 0.92rem; background: transparent; box-shadow: none; }
.hk-row { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.hk-row > input { flex: 1 1 10rem; min-width: 0; }
.hk-input {
  font: inherit; font-size: 1.1rem; color: var(--hk-ink); min-height: 2.9rem; padding: 0.5rem 0.75rem;
  border-radius: 0.45rem; border: 1.5px solid var(--hk-line); background: #121516;
}
.hk-input:focus { border-color: var(--hk-gold); outline: none; }
.hk-stop :where(button, input, select, [tabindex]):focus-visible { outline: 3px solid var(--hk-gold); outline-offset: 2px; }
.hk-note { font-size: 0.88rem; color: var(--hk-muted); }
.hk-mono { font-family: var(--hk-mono); }
.hk-readout { font-family: var(--hk-mono); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.3rem; color: var(--hk-gold-ink); }
.hk-meter { position: relative; height: 0.8rem; border-radius: 999px; background: #121516; border: 1px solid var(--hk-line); overflow: hidden; }
.hk-meter > span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #c48e1f, #f6d878); transition: width 120ms linear; }
.hk-meter > i { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--hk-ink); }
.hk-video { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 70vh; border-radius: var(--hk-radius); overflow: hidden; background: #000; }
.hk-video video, .hk-video canvas, .hk-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hk-permission { display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--hk-radius); border: 1.5px dashed var(--hk-line); }
.hk-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hk-shake { animation: hk-shake 380ms ease; }
@keyframes hk-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .hk-shake { animation: none; } .hk-meter > span { transition: none; } }


.benchbox .hk-head, .benchbox .hk-foot, .benchbox .hk-hints, .benchbox .hk-solved { display: none !important; }
.benchbox .hk-stop { margin: 0; }
