body { min-height: 100vh; background: var(--app); }
/* See review.css — [hidden] loses to any author display: rule. */
[hidden] { display: none !important; }
.challenge-topbar { min-height: 72px; padding: 13px max(22px, env(safe-area-inset-left)); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.challenge-topbar nav { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; }
.challenge-topbar nav a { min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; color: var(--ink-3); }
.challenge-page { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 100px; }
.challenge-eyebrow { margin: 0 0 10px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.challenge-welcome { text-align: center; }
.challenge-seal { position: relative; width: 94px; height: 94px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--accent-lt); box-shadow: var(--sh-dark); }
.challenge-seal span { font-size: 44px; line-height: 1; }
.challenge-seal i { position: absolute; inset: 8px; border: 1px solid rgba(255,255,255,.22); border-radius: inherit; }
/* The same voice as the landing page, not a louder one. This is the first
   Elam screen most people ever see — it arrives as a forwarded link — and
   it was set two steps bigger and tighter than the front door itself. */
.challenge-welcome > h1, .challenge-result > h1, .challenge-mine > h1 { max-width: 760px; margin: 0 auto 16px; font: 800 clamp(34px, 5.4vw, 60px)/1.08 var(--display); letter-spacing: -.035em; text-wrap: pretty; }
.challenge-intro, .challenge-mine > p { max-width: 650px; margin: 0 auto 30px; color: var(--ink-4); font-size: 17px; }
.challenge-card { max-width: 540px; margin: 0 auto; padding: 28px; background: white; border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-3); text-align: left; }
.challenge-card > span { color: var(--ink-4); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.challenge-card h2 { margin: 5px 0 22px; font-size: 23px; letter-spacing: -.03em; }
.challenge-card form, .challenge-card label { display: grid; gap: 8px; }
.challenge-card label { color: var(--ink-4); font-size: 13px; font-weight: 800; }
.challenge-card input { min-height: 52px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 16px; }
.challenge-card button { margin-top: 5px; }
.challenge-card > small { display: block; margin-top: 14px; color: var(--ink-5); line-height: 1.55; }
/* ─── The quiz shell ───
   Same construction as the main practice session: fixed to the viewport,
   header and footer pinned, and only the middle scrolling. In page flow the
   whole thing changed height between a two-option true/false and a six-pair
   match, so the answers moved under the reader's thumb between questions. */
.challenge-quiz {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: var(--session-bg);
}
.challenge-quiz > header {
  flex: none;
  display: grid; grid-template-columns: 80px 1fr 80px; align-items: center;
  padding: 14px max(18px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--session-line);
  background: var(--session-chrome);
}
.challenge-quiz > header button { justify-self: start; min-height: 44px; padding: 0 6px; display: flex; align-items: center; border: 0; background: none; color: var(--ink-4); font: 800 13px var(--ui); cursor: pointer; }
.challenge-quiz > header div { grid-column: 2; display: grid; gap: 8px; text-align: center; color: var(--ink-4); font-size: 12.5px; }
.challenge-quiz > header i { height: 5px; overflow: hidden; border-radius: 5px; background: var(--line); }
.challenge-quiz > header em { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }
#answer-form { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.challenge-quiz__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* Centre a short question rather than stranding it under the meter, but
   never push a long one up out of reach. */
.challenge-question {
  width: min(740px, 100%);
  margin: 0 auto;
  padding: 34px clamp(16px, 3vw, 26px) 34px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.challenge-quiz__foot { flex: none; border-top: 1px solid var(--session-line); background: var(--rail); }
.challenge-quiz__foot > div {
  width: min(740px, 100%);
  margin: 0 auto;
  padding: 14px clamp(16px, 3vw, 26px) max(14px, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 16px;
}
.challenge-quiz__foot .btn { flex: none; min-height: 50px; padding: 0 30px; }
.challenge-hint { margin: 0; flex: 1; color: var(--ink-4); font: 600 12.5px/1.5 var(--ui); }
#answer-hint { margin-top: 14px; flex: none; }
.challenge-question > h1 { margin: 0 0 30px; font-weight: 500; font-size: clamp(24px, 4.2vw, 34px); line-height: 1.8; letter-spacing: 0; text-wrap: pretty; }
#answer-area { display: grid; gap: 10px; }
.challenge-option { display: flex; width: 100%; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: var(--r-md); background: white; color: var(--ink); text-align: left; cursor: pointer; font: 500 17px/1.75 var(--et); }
.challenge-option b { flex: none; min-width: 30px; color: var(--ink-5); font: 800 13px var(--ui); }
.challenge-option.is-picked { border-color: var(--accent); background: var(--pick-bg); box-shadow: inset 3px 0 var(--accent); }
.challenge-match { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: white; }
.challenge-match span { display: flex; align-items: baseline; gap: 9px; font-family: var(--et); }
/* A matched row is marked by the rule and the number, not by the tint —
   the fill alone is not a state anyone can find. */
.challenge-match span b { flex: none; font: 800 12.5px/1.6 var(--ui); color: var(--ink-4); }
.challenge-match.is-set { border-color: var(--line-2); background: var(--rail); }
.challenge-match.is-set span b { color: var(--accent); }
.challenge-match select { width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: white; font-size: 15px; }
.challenge-match select option:disabled { color: var(--ink-5); }
.challenge-result { text-align: center; }
.score-compare { max-width: 620px; margin: 35px auto 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; }
.score-compare > div:not(.score-compare__mark) { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-xl); background: white; box-shadow: var(--sh-2); }
.score-compare small, .score-compare strong, .score-compare span { display: block; }
.score-compare small { color: var(--ink-4); font-weight: 800; }
.score-compare strong { margin: 5px 0; font-size: 54px; line-height: 1; letter-spacing: -.06em; }
.score-compare span { color: var(--ink-4); font-size: 12.5px; }
.score-compare__mark { color: var(--accent); font-weight: 800; }
.result-verdict { margin: 0 0 24px; font-size: 17px; font-weight: 700; }
/* `.actions` carries the row and the stacking; a challenge result is a
   centred page, so this only says where the row sits on it. */
.result-actions { justify-content: center; gap: 10px; }
.challenge-review { margin-top: 60px; text-align: left; }
.challenge-review > h2 { font-size: 22px; }
.challenge-review-card { margin-top: 12px; padding: 22px; background: white; border: 1px solid var(--line); border-radius: var(--r-lg); }
.challenge-review-card h3 { margin: 0 0 14px; font: 600 19px/1.6 var(--et); }
.challenge-review-card p { margin: 9px 0 0; font-family: var(--et); color: var(--ink-3); }
.challenge-review-card small { display: block; margin-top: 12px; color: var(--ink-5); }
.challenge-mine { text-align: center; }
/* This page is a list, not a landing. Its heading opened at 36px over three
   lines explaining how the scores get here — the whole first screen of a
   phone before a single score. The news is what came back. */
.challenge-mine > h1 { font: 800 clamp(25px, 3.4vw, 33px)/1.16 var(--display); letter-spacing: -.02em; margin-bottom: 10px; }
.challenge-mine > p { margin-bottom: 0; font-size: 15.5px; }
#mine-list { display: grid; gap: 14px; margin: 26px 0 28px; text-align: left; }
.mine-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-xl); background: white; }
.mine-card h2 { margin: 0; font-size: 18px; }
.mine-card header small { display: block; margin-top: 5px; color: var(--ink-4); }
.mine-card ul { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.mine-card li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.mine-card li > span { display: flex; flex-direction: column; gap: 2px; }
.mine-card li small { color: var(--ink-5); font-weight: 500; }
.mine-empty { padding: 50px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-xl); color: var(--ink-4); text-align: center; }
/* One line for everything nobody has answered yet, in place of one card
   each. `list-style: none` on the summary is what removes the native
   triangle in Safari and Firefox; the ::-webkit- rule is Chrome's. */
.mine-waiting { border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--rail); }
.mine-waiting summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; color: var(--ink-3); font-weight: 700; cursor: pointer; list-style: none; }
.mine-waiting summary::-webkit-details-marker { display: none; }
.mine-waiting summary::after { content: "▾"; margin-inline-start: auto; color: var(--ink-5); transition: transform .16s ease; }
.mine-waiting[open] summary::after { transform: rotate(180deg); }
.mine-waiting summary:hover { color: var(--ink); }
.mine-waiting summary:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; border-radius: var(--r-xl); }
.mine-waiting ul { margin: 0; padding: 0 18px 6px; list-style: none; }
.mine-waiting li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink-3); }
.mine-waiting li small { flex: none; color: var(--ink-5); font-weight: 500; }
.challenge-error { padding: 90px 0; text-align: center; }
.challenge-error > span { color: var(--accent); font-size: 50px; }
.challenge-error h1 { margin: 10px 0; font-size: 38px; }
.challenge-error p { margin: 0 0 24px; color: var(--ink-4); }

/* "My challenges" used to be hidden here — on exactly the device an
   invitation arrives on, which left the screen that collects a friend's
   scores with no route to it at all. The brand text goes instead; the
   mark stays and still leads home. */
@media(max-width:600px){.challenge-page{padding-top:38px}.challenge-topbar{padding-inline:max(14px, env(safe-area-inset-left))}.challenge-topbar .brand__txt{display:none}.challenge-topbar nav a{padding:0 8px}.challenge-welcome>h1,.challenge-result>h1{font-size:36px}.challenge-card{padding:22px}.score-compare{gap:7px}.score-compare>div:not(.score-compare__mark){padding:17px 10px}.score-compare strong{font-size:43px}.challenge-match{grid-template-columns:1fr;gap:8px}.challenge-question{padding:24px 16px}.challenge-quiz__foot>div{gap:10px}.challenge-quiz__foot .btn{padding:0 20px}#answer-status{font-size:11.5px}}

/* A cold visitor arrives here from a forwarded link with no idea what Elam
   is or who runs it. One sentence and the two legal pages, the same as the
   landing page's foot — otherwise this page introduces the platform to more
   people than any other and never names it. */
.challenge-foot {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  color: var(--ink-4);
  font: 500 13px/1.65 var(--ui);
}
.challenge-foot p { margin: 0; max-width: 58ch; }
.challenge-foot nav { display: flex; flex-wrap: wrap; gap: 4px; }
.challenge-foot nav a { min-height: 44px; padding: 0 10px; display: inline-flex; align-items: center; color: var(--ink-3); font-weight: 700; }
.challenge-foot nav a:hover { color: var(--accent-2); }
