/* One plan's line, wherever a plan is named with its marks (T-262, T-263): the home page's problem cards and plan list, the Coaching plans
   page, the member's catalogue. Loaded in the head of every page by the public package's head slot (app/public/slots.py). Author: Jeremiah Buttler

   The fault it removes: a row of [title][badges] where the badges keep their full width (flex: none, white-space: nowrap) and the title can
   shrink to its longest word, so a long staff mark squeezed the title into a column a few words wide and ran past the card's edge.
   The rule here: the title always keeps at least half of the line; the marks wrap onto their own line under it in a narrow box (a card,
   a phone), and sit at the right of the title only where the line is wide enough for both; no mark is ever wider than the line.

   Markup:  <x class="plan-line" data-plan-line><span class="plan-line__t" data-plan-title>Title</span>
              <span class="plan-line__m">level tag, any other mark, the staff mark</span></x> */

.plan-line { container-type: inline-size; display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-3); min-width: 0; }
.plan-line__t { flex: 1 1 100%; min-width: 0; overflow-wrap: break-word; }
.plan-line__m { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); min-width: 0; max-width: 100%; }
.plan-line__m > * { max-width: 100%; }
.plan-line__m > .tag, .plan-line__m > .plan-mark { margin: 0; }   /* the In Development mark beside a plan badge: the row's gap spaces it */
.plan-line__note { font-family: var(--font-text, inherit); font-weight: 400; font-size: var(--fs-small); line-height: 1.35; color: var(--muted); }
@container (min-width: 34rem) {
  .plan-line__t { flex: 1 1 55%; }
  .plan-line__m { margin-left: auto; justify-content: flex-end; max-width: 45%; }
}

/* The staff mark ("Awaiting your approval", "Approved"): drawn only for staff and administrators (the routes add it for them alone), small,
   in sentence case, and free to wrap, so it never sets the width of anything a member or visitor sees. One rule for every page. */
.tag.tag--hold, .tag.tag--approved {
  font-family: var(--font-text, inherit); font-weight: 400; font-size: var(--fs-small); line-height: 1.3; letter-spacing: 0; text-transform: none;
  white-space: normal; max-width: 100%; padding: 1px var(--sp-2); background: transparent; color: var(--muted);
}
.tag.tag--hold { border: 1px dashed var(--accent); color: var(--ink); }
.tag.tag--approved { border: 1px solid var(--rule-strong, var(--rule)); }
