/* ============================================================
   IMPACT Learning Hub — subject tutorials
   Depends on style.css, layout.css, home.css (chips, grid)
   ------------------------------------------------------------
   Two filter rows: subjects across the top, then stages for
   whichever subject is selected. Academic subjects group their
   stages under Primary / Secondary / Post-Secondary headings;
   proficiency subjects show a single flat row.
   ============================================================ */

.tut-controls{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.tut-controls input[type=search]{ flex: 1 1 300px; min-width: 0; }

/* ---------- stage filter ---------- */
.stage-filter{
  border: var(--border);
  border-left: 3px solid var(--div-hub);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--surface);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.stage-filter[hidden]{ display: none; }

.stage-group{ margin-top: 14px; }
.stage-group + .stage-group{
  margin-top: 16px;
  padding-top: 14px;
  border-top: var(--hairline);
}
.stage-group-label{
  font-family: var(--font-body);
  font-size: var(--step--2);
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.stage-row{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Smaller chip for the stage row — the subject row above it is
   the primary choice and should stay visually dominant. */
.chip.small{
  min-height: 34px;
  padding: 5px 12px;
  font-size: var(--step--1);
  gap: 8px;
}
.chip-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--stone-soft);
  color: var(--ink-faint);
  font-size: var(--step--2);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip-count{
  background: rgba(255,255,255,.22);
  color: #fff;
}

/* ---------- placement note ---------- */
.tut-note{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
}
.tut-note h2{ font-size: var(--step-2); margin-bottom: 6px; }
.tut-note p{ margin: 0; max-width: 62ch; }
.tut-note .btn{ flex: none; }

@media (max-width: 560px){
  .stage-filter{ padding: 14px; }
  .tut-controls{ gap: 10px; }
  .tut-controls input[type=search]{ flex-basis: 100%; }
  .tut-controls .btn{ width: 100%; }
}
