/* Reader challenges (hub/challenges.py, challenge.js): on test pages and in the main page's test detail.
   Uses the tokens from style.css only, so both themes work. */

.hc-list { list-style: none; padding: 0; margin: 4px 0 14px; }
.hc-item { padding: 12px 0; border-top: 1px solid var(--line); }
.hc-empty { padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.hc-top { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .82rem; color: var(--ink-3); margin-bottom: 6px; }
.hc-st { font: 600 .74rem var(--sans); padding: 2px 8px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); }
.hc-st.accepted { background: var(--good-soft); color: var(--good); }
.hc-st.rejected { background: var(--line); color: var(--ink-2); }
.hc-cat { font-weight: 600; color: var(--ink-2); }
.hc-text { white-space: pre-line; overflow-wrap: anywhere; font-size: .95rem; margin-bottom: 6px; }
.hc-link { margin-bottom: 4px; }
.hc-link a { overflow-wrap: anywhere; }
.hc-who { margin-bottom: 4px; }
.hc-res { font-size: .9rem; color: var(--ink-2); padding: 6px 10px; border-left: 2px solid var(--line-2); margin: 6px 0 0; }

.hc-add { background: var(--accent-soft); border-radius: 6px; padding: 10px 14px; margin: 0 0 10px; font-size: .95rem; color: var(--ink); }
.hc-add p { margin: 0 0 4px; overflow-wrap: anywhere; }
.hc-add p:last-child { margin: 0; }

.hc-wrap { margin-top: 6px; }
.hc-wrap > summary { cursor: pointer; color: var(--accent); font-weight: 600; width: fit-content; }
.hc-form { display: grid; gap: 4px; margin-top: 12px; max-width: 640px; position: relative; }
.hc-form label { font-weight: 600; font-size: .9rem; margin-top: 10px; }
.hc-form label .muted { font-weight: 400; }
.hc-form select, .hc-form textarea, .hc-form input[type="url"] {
  width: 100%; min-width: 0; font: 400 1rem/1.45 var(--sans); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 8px 10px;
}
.hc-form textarea { resize: vertical; min-height: 7.5em; }
.hc-form select:focus, .hc-form textarea:focus, .hc-form input[type="url"]:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.hc-form .hc-count { margin: 0; text-align: right; }
.hc-form .hc-sign { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 12px 0 0; color: var(--ink); }
.hc-form .hc-sign input { margin-top: 5px; flex: none; }
.hc-fine { margin: 2px 0 6px; }
.hc-form .btn { justify-self: start; margin-top: 6px; }
.hc-out { margin: 6px 0 0; min-height: 1.4em; }
.hc-out.ok { color: var(--good); }
.hc-out.bad { color: var(--bad); }
.hc-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* main page: inside a test's "Method, numbers and receipt" detail */
.hc-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.hc-box h4 { font: 600 .95rem/1.3 var(--sans); margin: 0 0 4px; color: var(--ink); }
.hc-box > p { font-size: .88rem; }
