/* The testers' Missions page, "the path" (TW #3425, from worker a's mockup B): numbered circles joined by a
   line, green up to the next mission. One column at every width; compact rows for folded and locked steps.
   Shared by the members' side (TW #3431), whose --m-* colours (light and dark) it takes; the admin side has
   none, so the fallbacks are its colours. */
.tm-intro { font-size: 1.05rem; }
.tm-track { max-width: 44rem; background: var(--m-card, #fff); border: 1px solid var(--m-line, #dee2e6); border-radius: .5rem; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.tm-track-name { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--m-muted, #6c757d); font-weight: 600; margin: 0 0 1rem; }
.tm-path { list-style: none; margin: 0; padding: 0; }
.tm-step { --tm-line: #ced4da; --tm-center: 1.75rem; position: relative; display: grid; grid-template-columns: 3.5rem 1fr; column-gap: .9rem; align-items: start; padding-bottom: 1.1rem; }
.tm-step--compact { --tm-center: .95rem; padding-bottom: .7rem; }
.tm-path > .tm-step:last-child { padding-bottom: 0; }
/* the line: through each step, from the first dot's centre to the last one's */
.tm-step::before { content: ""; position: absolute; left: calc(1.75rem - 2px); top: 0; bottom: 0; width: 4px; background: var(--tm-line); }
.tm-path > .tm-step:first-child::before { top: var(--tm-center); }
.tm-path > .tm-step:last-child::before { bottom: calc(100% - var(--tm-center)); }
.tm-step--done { --tm-line: #198754; }
/* into the next step the line is green, then grey on */
.tm-step--next::after { content: ""; position: absolute; left: calc(1.75rem - 2px); top: 0; height: var(--tm-center); width: 4px; background: #198754;
                        transform-origin: top; animation: tm-fill .6s ease-out both; }
.tm-path > .tm-step--next:first-child::after { display: none; }
@keyframes tm-fill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .tm-step--next::after { animation: none; } }
.tm-dot { position: relative; z-index: 1; grid-row: 1 / span 2; justify-self: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center;
          font-size: 1.3rem; font-weight: 700; border: 4px solid var(--m-card, #fff); box-shadow: 0 0 0 2px #ced4da; background: #f1f3f5; color: #868e96; }
.tm-step--compact .tm-dot { width: 1.9rem; height: 1.9rem; font-size: .8rem; border-width: 2px; }
.tm-step--done .tm-dot { background: #198754; color: #fff; box-shadow: 0 0 0 2px #198754; }
.tm-step--next .tm-dot { background: #f2b51c; color: #1f2937; box-shadow: 0 0 0 3px #003a70; }
.tm-body { min-width: 0; padding-top: .15rem; }
.tm-step--compact .tm-body, .tm-step--compact > details { padding-top: .3rem; }
.tm-code { font-size: .78rem; font-weight: 700; color: var(--m-accent, #003a70); letter-spacing: .05em; }
.tm-title { font-weight: 600; }
.tm-title--next { font-size: 1.15rem; display: inline-block; margin: .1rem 0 .25rem; }
.tm-sub { font-size: .9rem; color: var(--m-muted, #6c757d); }
.tm-sub.task-text p:last-child, .tm-sub.task-text ol:last-child, .tm-sub.task-text ul:last-child { margin-bottom: 0; }
.tm-step--next .tm-sub { margin-bottom: .75rem; color: var(--m-fg, #495057); }
.tm-step--locked .tm-body, .tm-step--locked .tm-code, .tm-step--locked-more summary { color: #868e96; }
.tm-step--locked .tm-title { font-weight: 500; }
.tm-start { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; border: 0; border-radius: .5rem; cursor: pointer; text-decoration: none;
             background: var(--m-accent, #003a70); color: var(--m-on-accent, #fff); font: inherit; font-weight: 700; font-size: 1.05rem; padding: .55rem 1.1rem; }
.tm-start:hover, .tm-start:focus-visible { filter: brightness(.9); color: var(--m-on-accent, #fff); }
.member-page a.tm-start { color: var(--m-on-accent); }
.tm-step form { margin: 0; }
.tm-step > details summary { cursor: pointer; font-weight: 600; list-style: none; }
.tm-step > details summary::-webkit-details-marker { display: none; }
.tm-step > details summary::after { content: " ▸"; font-weight: 400; }
.tm-step > details[open] summary::after { content: " ▾"; }
.tm-step--done > details summary { color: var(--m-go, #146c43); }
.tm-path--inner { margin-top: .6rem; }
.tm-path--inner .tm-step::before { display: none; }
.tm-path--inner .tm-step { grid-template-columns: 1.9rem 1fr; column-gap: .6rem; margin-left: -2.3rem; }

/* The members' mission page and All feedback (TW #3431): plain lists in the members' colours. */
.tm-page-section { margin-bottom: 1.5rem; }
.tm-page-section h2 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.tm-average-face { font-size: 1.8rem; vertical-align: middle; }
.tm-ratings, .tm-feedback { list-style: none; margin: 0; padding: 0; }
.tm-ratings li { padding: .5rem 0; border-top: 1px solid var(--m-line, #dee2e6); }
.tm-ratings .tm-line-body { display: block; color: var(--m-muted, #6c757d); font-size: .95rem; white-space: pre-line; }
.tm-line { background: var(--m-card, #fff); border: 1px solid var(--m-line, #dee2e6); border-radius: .6rem; padding: .7rem .9rem; margin-bottom: .6rem; font-size: .95rem; }
.tm-line.is-problem { border-color: #e0a800; }
.tm-line-who { color: var(--m-muted, #6c757d); font-size: .85rem; }
.tm-line-who strong { color: var(--m-fg, #212529); }
.tm-line-what { margin-top: .2rem; }
.tm-line .tm-line-problem, .tm-line .tm-line-body { margin: .3rem 0 0; white-space: pre-line; }
.member-page .tm-track-name { font-size: .78rem; line-height: 1.4; border: 0; padding: 0; margin: 0 0 1rem; }

/* Try again (TW #3432): a quiet link-like toggle; tapping it opens the one-line confirm. */
.tm-try-again { margin-top: .5rem; font-size: .95rem; }
.tm-try-again summary { display: inline-block; cursor: pointer; list-style: none; color: var(--m-accent, #003a70); text-decoration: underline; font-weight: 600; }
.tm-try-again summary::-webkit-details-marker { display: none; }
.tm-try-again[open] summary { display: none; }
.tm-try-again-confirm { border: 1px solid var(--m-line, #dee2e6); border-radius: .5rem; padding: .6rem .8rem; background: var(--m-card, #fff); }
.member-page .tm-try-again-ask, .tm-try-again-ask { margin: 0 0 .5rem; }
.tm-try-again-buttons { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.tm-try-again-buttons form { margin: 0; }
.tm-try-again-go { min-height: 44px; border: 0; border-radius: .5rem; padding: .4rem 1rem; font: inherit; font-weight: 700; cursor: pointer;
                   background: var(--m-accent, #003a70); color: var(--m-on-accent, #fff); }

/* Which track(s) they're on (TW #3454). */
.member-page .tm-your-tracks, .tm-your-tracks { font-weight: 600; margin: -.25rem 0 1rem; }
