/* Quests: ruled rows like the redeem catalog, with a native progress element so no inline style is needed (CSP). */
.quest-list{list-style:none;margin:0;padding:0}
.quest-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-3) var(--space-5);align-items:center;padding:var(--space-4) 0;border-top:1px solid var(--border)}
.quest-row:first-child{border-top:0}
.quest-row__main{min-width:0;display:flex;flex-direction:column;gap:var(--space-1)}
.quest-icon{display:grid;place-items:center;color:var(--accent-text)}
.quest-row__name{display:flex;align-items:center;gap:var(--space-3);flex-wrap:wrap}
.quest-row__text{color:var(--text-muted);font-size:var(--fs-sm)}
.quest-row__meta{display:flex;gap:var(--space-4);flex-wrap:wrap;color:var(--text-subtle);font:var(--fs-xs)/1.4 var(--font-mono)}
.quest-row__progress{display:flex;align-items:center;gap:var(--space-3);max-width:520px;margin-top:var(--space-1);font:var(--fs-xs)/1 var(--font-mono);color:var(--text-muted)}
.quest-progress{flex:1;min-width:0;height:10px;appearance:none;-webkit-appearance:none;border:0;border-radius:var(--radius-sm);overflow:hidden;background:var(--surface-sunken);color:var(--accent-text)}
.quest-progress::-webkit-progress-bar{background:var(--surface-sunken)}
.quest-progress::-webkit-progress-value{background:var(--accent-text)}
.quest-progress::-moz-progress-bar{background:var(--accent-text)}
.quest-row__action{display:flex;align-items:center;gap:var(--space-4);flex-wrap:wrap;justify-content:flex-end}
.quest-row__reward{font:var(--fw-bold) var(--fs-sm)/1.3 var(--font-mono);text-align:right}
/* Group goals: the same ruled rows, plus tier markers and a contributor board. */
.goal-note{color:var(--text-subtle);font-size:var(--fs-xs)}
.goal-tiers{list-style:none;margin:var(--space-1) 0 0;padding:0;display:flex;gap:var(--space-5);flex-wrap:wrap;font:var(--fs-xs)/1.4 var(--font-mono);color:var(--text-subtle)}
.goal-tier{display:flex;gap:var(--space-2);align-items:baseline}
.goal-tier__name{font-weight:var(--fw-bold)}
.goal-tier--reached{color:var(--accent-text)}
.goal-tier--reached .goal-tier__name::before{content:"✓ "}
.goal-board{margin-top:var(--space-2);font-size:var(--fs-sm)}
.goal-board summary{cursor:pointer;color:var(--text-muted)}
.goal-board__list{list-style:none;margin:var(--space-2) 0 0;padding:0;display:flex;flex-direction:column;gap:var(--space-2);max-width:420px}
.goal-board__row{display:flex;justify-content:space-between;align-items:center;gap:var(--space-4)}
.quest-row--done .h3,.quest-row--locked .h3,.quest-row--done .quest-row__reward,.quest-row--locked .quest-row__reward{color:var(--text-muted)}
@media (max-width:600px){
  .quest-row{grid-template-columns:minmax(0,1fr)}
  .quest-row__action{grid-column:1/-1;justify-content:space-between}
  .quest-row__reward{text-align:left}
}
/* Timed sessions: the live banner on the quests page, the board rail and the live page. */
.timed__clock{font:var(--fw-bold) var(--fs-sm)/1.3 var(--font-mono);color:var(--accent-text)}
/* The wrapper holds nothing when no session is open, so it must take no space (or a gap) of its own. */
#timed{display:contents}
.rail .quest-row{grid-template-columns:minmax(0,1fr)}
.rail .quest-row__action{justify-content:space-between}
.rail .quest-row__reward{text-align:left}
/* The admin trigger form: three cards side by side where there is room, a gap between the fields in each. */
.trigger-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr));gap:var(--space-8) var(--space-10);align-items:start}
.trigger-form__group{display:flex;flex-direction:column;gap:var(--space-5)}
.trigger-form>.row{grid-column:1/-1}
/* Admin quest tools: the list filters, category rows, the multi-select and the claims chart. */
.quest-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:var(--space-5);align-items:end}
.quest-slug{font:var(--fs-xs)/1.3 var(--font-mono)}
.quest-multi{min-height:9em}
.category-form{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;gap:var(--space-5);align-items:end}
.category-row{display:flex;justify-content:space-between;align-items:end;gap:var(--space-5);padding:var(--space-4) 0;border-top:1px solid var(--border)}
.category-row:first-child{border-top:0}
.category-row .category-form{flex:1;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto auto}
.claims-chart{display:block;width:100%;height:auto}
.claims-chart__bar{fill:var(--chart-1)}
.claims-chart__base{stroke:var(--chart-grid);stroke-width:1}
.claims-chart__label{fill:var(--text-subtle);font:var(--fs-xs) var(--font-mono)}
.quest-row__category{color:var(--text-subtle);font:var(--fs-xs)/1.4 var(--font-mono);text-transform:uppercase;letter-spacing:var(--tracking-caps)}
@media (max-width:600px){
  .category-form,.category-row .category-form{grid-template-columns:minmax(0,1fr)}
  .category-row{flex-direction:column;align-items:stretch}
}
