/* unit-pills.css — jump straight to any unit, on the Level 2 unit pages.
 *
 * Level 2 had previous/next: two links, and to reach unit 209 from 202 you
 * followed them five times or went back to the index. Level 1 has a row of
 * numbered pills instead, every unit reachable in one click with the current
 * one filled in, and it is plainly the better of the two — you can see where
 * you are in the course as well as move around it.
 *
 * This is the Level 1 pill styling with Level 2's tokens, in one shared file
 * rather than copied into nine pages. The Level 1 version lives in
 * l1-hub.css (.unit-hop); the two are deliberately the same shape, so a change
 * to one should be made to the other.
 */

.unit-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto 22px;
    padding: 0;
}

.unit-pill {
    display: inline-grid;
    place-items: center;
    min-width: 44px;              /* a 44px target, which is the accessible minimum */
    padding: 7px 10px;
    background: #fff;
    border: 1.5px solid rgba(37, 99, 235, 0.22);
    border-radius: 9px;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 800;
    color: #475569;
    text-decoration: none;
    font-variant-numeric: tabular-nums;   /* so the numbers line up */
    transition: border-color 0.15s, color 0.15s;
}

.unit-pill:hover {
    border-color: var(--blue-accent, #2563eb);
    color: var(--blue-accent, #2563eb);
}

/* The unit you are on. aria-current carries this for a screen reader; the fill
   carries it for everyone else. */
.unit-pill.on {
    background: var(--blue-accent, #2563eb);
    border-color: var(--blue-accent, #2563eb);
    color: #fff;
}

.unit-pill:focus-visible {
    outline: 3px solid var(--blue-accent, #2563eb);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .unit-pill { transition: none; }
}

/* The lesson name in the progress table jumps to that lesson, so the separate
   row of links above it is no longer needed. Underlined on hover and focus
   rather than always: a column of ten permanently underlined names reads as a
   wall of links rather than as a table.

   The anchor sits INSIDE the cell rather than replacing it — the row is a grid
   with role="cell", and turning the cell into a link would swap the role a
   screen reader needs for the table. */
.progress-cell-lesson a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.progress-cell-lesson a:hover {
  color: var(--blue-accent, #2563eb);
  text-decoration: underline;
}
.progress-cell-lesson a:focus-visible {
  outline: 3px solid var(--blue-accent, #2563eb);
  outline-offset: 3px;
  border-radius: 4px;
}
