/* Team Lineup & Rotation Planner (#052). Only this tool's own pieces; everything else is the shared tool frame.
   Colours come from the site's variables only (tests/catalogue.test.mjs checks there are no hex values here).
   Touchline first: big targets, the next change and Done at the top of the match view, one hand on a phone. */

/* ---------- set-up ---------- */
.tl-list { min-height: 170px; font-size: 17px; line-height: 1.55; }
.tl-status { margin: -2px 0 0; min-height: 1.4em; font-size: 14px; color: var(--slate); font-variant-numeric: tabular-nums; }
.tl-status.is-problem { color: var(--graphite); font-weight: 600; }
.tl-status:empty { min-height: 0; }
.tl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tl-row__l { font-size: 15px; font-weight: 600; }
.tl-other { margin-top: 12px; }
.tl-step { flex: none; width: max-content; }
.tl-length__c { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.tl-unit { font-size: 15px; color: var(--slate); }
.tl-style__opts { display: grid; gap: 8px; }
.tl-go { margin-top: 22px; }
.tl-go .field__warn { margin-top: 10px; }
#tl-make.is-armed { white-space: normal; }
#tl-changes-note { margin-top: -6px; }

/* Stage C1: Plan positions too? as two cards, right after the match basics. */
.tl-posq { margin-top: 2px; }
.tl-posq__opts { display: grid; gap: 8px; }
/* What follows the squad: only what's unusual. */
.tl-after { display: grid; gap: 18px; margin-top: 4px; }
.tl-after > .field { margin: 0; }
.tl-shape__top { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.tl-shape__l { font-size: 15px; font-weight: 600; }
.tl-shape__v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-shape__top .tl-link { margin-left: auto; min-height: 40px; font-size: 15px; }
.tl-shape__pick { display: grid; gap: 12px; margin-top: 8px; }
.tl-shape__pick .tl-chips { margin: 0; padding: 0; border: 0; min-width: 0; }
.tl-shape__pick legend { margin-bottom: 8px; }
.tl-keeper legend, .tl-who legend { font-weight: 600; }
/* The players: one quiet row each (name, and anything unusual), the panel for one of them opened in place. */
.tl-plist { list-style: none; margin: 0; padding: 0; border-radius: var(--r-card); background: var(--white); box-shadow: inset 0 0 0 1px var(--silver); }
.tl-pr + .tl-pr, .tl-pp + .tl-pr { box-shadow: inset 0 1px 0 var(--mist); }
.tl-pr__b { display: flex; align-items: center; gap: 4px 12px; width: 100%; min-height: 48px; padding: 10px 14px; border: 0; background: none; font: inherit; color: var(--graphite); text-align: left; cursor: pointer; }
.tl-pr__b:focus-visible { outline: 3px solid var(--graphite); outline-offset: -3px; border-radius: var(--r-card); }
.tl-pr__n { flex: 0 0 auto; max-width: 58%; font-size: 16px; overflow-wrap: anywhere; }
.tl-pr__s { flex: 1 1 auto; min-width: 0; margin-left: auto; font-size: 13.5px; line-height: 1.35; color: var(--slate); text-align: right; overflow-wrap: anywhere; }
.tl-pr__s:empty { display: none; }
.tl-pr__go { flex: none; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--steel); border-bottom: 2px solid var(--steel); transform: rotate(-45deg); }
.tl-pr__s:not(:empty) + .tl-pr__go { margin-left: 0; }
.tl-pr__b[aria-expanded="true"] .tl-pr__go { transform: rotate(45deg); }
.tl-pr__b[aria-expanded="true"] { font-weight: 600; }
.tl-pp { display: grid; gap: 10px; margin: 0 6px 8px; padding: 14px; border-radius: var(--r-card); background: var(--white); box-shadow: 0 0 0 1.5px var(--graphite), 0 10px 24px -14px rgba(30, 30, 45, .35); }
.tl-pp__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tl-pp__h { margin: 0; min-width: 0; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.tl-pp__h:focus { outline: none; }
.tl-pp__h:focus-visible { outline: 3px solid var(--graphite); outline-offset: 2px; }
.tl-pp__done { flex: none; min-height: 40px; }
.tl-pp__more > summary, .tl-pp__al > summary { min-height: 40px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--slate); cursor: pointer; list-style: none; }
.tl-pp__more > summary::-webkit-details-marker, .tl-pp__al > summary::-webkit-details-marker { display: none; }
.tl-pp__more > summary::after, .tl-pp__al > summary::after { content: "+"; color: var(--steel); }
.tl-pp__more[open] > summary::after, .tl-pp__al[open] > summary::after { content: "−"; }
.tl-pp__more > summary:focus-visible, .tl-pp__al > summary:focus-visible { outline: 3px solid var(--graphite); outline-offset: 2px; }
.tl-pp__al .tl-nums { padding: 2px 0 6px; }
/* Stage C2: anything else about a player is secondary: small toggles and one line that opens. */
.tl-pp__else { display: grid; gap: 6px; }
.tl-pp__l { margin: 0; font-size: 13.5px; font-weight: 600; color: var(--slate); }
.tl-pp__ts { gap: 6px; }
.tl-pp__ts .chip span { padding: 9px 12px; }
.tl-pp--pos .tl-pp__else { padding-top: 10px; border-top: 1px solid var(--mist); }
/* Where can they play? A small pitch read from the goal out, each line with its shortcut first. Pressed positions are
   dark and ticked (never colour alone); positions the shape doesn't use are fainter and dashed. */
.tl-pk__f { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.tl-pk__q { padding: 0; margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.tl-pk__h { margin: -6px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--slate); }
.tl-pk__grid { display: grid; gap: 6px; padding: 8px; border-radius: var(--r-card); background: var(--mist); }
.tl-pk__row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tl-pk { display: flex; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 44px; padding: 0 2px; border: 0; border-radius: 10px; background: var(--white); box-shadow: inset 0 0 0 1px var(--silver); font: inherit; font-size: 15px; font-weight: 600; color: var(--graphite); cursor: pointer; }
.tl-pk[aria-pressed="true"] { background: var(--graphite); color: var(--white); box-shadow: none; }
.tl-pk[aria-pressed="true"]::before { content: "✓"; font-size: 12px; }
.tl-pk--line { background: transparent; box-shadow: inset 0 0 0 1.5px var(--steel); font-size: 12.5px; letter-spacing: .05em; color: var(--slate); }
.tl-pk.is-unused:not([aria-pressed="true"]) { background: transparent; box-shadow: none; outline: 1px dashed var(--steel); outline-offset: -1px; color: var(--slate); }
.tl-pk:focus-visible { outline: 3px solid var(--graphite); outline-offset: 2px; }
.tl-pk__s { margin: 0; font-size: 14px; line-height: 1.4; color: var(--slate); }
.tl-pk__only { justify-self: start; }
.tl-only { margin-top: 12px; }
.tl-only__q { margin: 0 0 8px; font-size: 14px; color: var(--slate); }
.tl-pp__in { display: grid; gap: 10px; padding-top: 4px; }
.tl-pp__in .btn { justify-self: start; white-space: normal; text-align: left; }
.tl-pp__nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--mist); }
.tl-pp__nav .btn { min-height: 44px; max-width: 48%; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.tl-pp__next { margin-left: auto; text-align: right; }
.tl-tick { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; cursor: pointer; }
.tl-tick input { width: 22px; height: 22px; flex: none; accent-color: var(--graphite); }
.tl-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.tl-num { display: grid; gap: 4px; font-size: 13.5px; color: var(--slate); }
.tl-num .input { min-height: 44px; font-size: 17px; font-variant-numeric: tabular-nums; }
/* Rotation style: the earliest change during play (Auto, or Not before …). */
.tl-early { margin: 0; padding: 0; border: 0; min-width: 0; }
.tl-early__n { margin-top: 10px; }
.tl-early__in { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
.tl-early__in .input { width: 88px; min-height: 44px; font-size: 17px; font-variant-numeric: tabular-nums; }
/* The printout title, with Print and the PDF. */
.tl-ptitle { margin: -4px 0 14px; max-width: 420px; }
.tl-ptitle .field { margin: 0; }

/* Positions (Stage B): the exact counts (Stage C1: under Change › Other), who can go in goal as name chips. */
.tl-pos { display: grid; gap: 12px; min-width: 0; }
.tl-pos > * { min-width: 0; }
.tl-pos .field__hint { margin: 0; }
.tl-pos__counts { display: grid; gap: 6px; min-width: 0; border-radius: var(--r-card); background: var(--white); box-shadow: inset 0 0 0 1px var(--silver); padding: 6px 6px 6px 12px; }
.tl-pos__row { flex-wrap: nowrap; }
.tl-pos__row + .tl-pos__row { padding-top: 6px; box-shadow: inset 0 1px 0 var(--mist); }
.tl-pos__row .tl-row__l { min-width: 0; font-weight: 500; font-size: 16px; overflow-wrap: anywhere; }
.tl-pos__row .tl-step { margin-left: auto; }
.tl-pos .tl-status { margin: 0; }
#tl-pos-shape { justify-self: start; white-space: normal; text-align: left; }
.tl-who { margin: 0; padding: 0; border: 0; min-width: 0; }
.tl-who legend { padding: 0; margin-bottom: 4px; font-weight: 600; }
.tl-who .field__hint { margin: 0 0 8px; }
.tl-who__names { flex-wrap: wrap; }
.tl-link { padding: 0; border: 0; background: none; font: inherit; color: var(--graphite); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tl-link:focus-visible { outline: 3px solid var(--graphite); outline-offset: 2px; }

/* ---------- what can't work, and the fixes ---------- */
.tl-problem { margin: 14px 0 0; padding: 14px 16px; scroll-margin: 88px 0 24px; border-radius: var(--r-card); background: var(--white); box-shadow: inset 0 0 0 1.5px var(--graphite); }
.tl-problem__t { margin: 0; font-size: 15px; line-height: 1.5; font-weight: 600; }
.tl-problem__item + .tl-problem__item { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--mist); }
.tl-problem__changed { margin: 14px 0 0; font-size: 14px; line-height: 1.45; color: var(--slate); }
.tl-problem__fixes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.tl-problem__or { font-size: 14px; color: var(--slate); }
.tl-problem__fixes .btn { white-space: normal; text-align: left; }
.tl-stale { margin: 0 0 12px; padding: 12px 14px; border-radius: var(--r-card); background: var(--white); box-shadow: inset 0 0 0 1.5px var(--graphite); font-size: 15px; font-weight: 600; }
.tl-paper.is-stale .tl-result { opacity: .45; }

/* What to include in the printout (shared chooser, styled here). */
.pdf-sections { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.pdf-sections legend { padding: 0; margin-bottom: 8px; color: var(--slate); }

/* ---------- the result ---------- */
.tl-empty { margin: 0; padding: 36px 0 20px; font-size: 15px; color: var(--steel); }
.tl-summary { margin: 4px 0 18px; }
.tl-sum { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; }
.tl-note { margin: 4px 0 0; font-size: 14px; line-height: 1.45; color: var(--slate); }
/* Players whose minutes differ because of their settings: one line, opened for the detail. */
.tl-own { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--slate); }
.tl-own > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--silver); }
.tl-own > summary::-webkit-details-marker { display: none; }
.tl-own > summary::after { content: "+"; text-decoration: none; color: var(--steel); }
.tl-own[open] > summary::after { content: "−"; }
.tl-own > summary:focus-visible { outline: 3px solid var(--graphite); outline-offset: 2px; }
.tl-own__l { margin: 4px 0 0; padding-left: 18px; }
.tl-own__l li { overflow-wrap: anywhere; }
/* The frame's "· N set" count reads like a technical tally here: this tool says what's chosen in words instead. */
#tl-more .more__set { display: none; }
.tl-views { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: var(--r-btn); background: var(--mist); }
.tl-view { min-height: 40px; padding: 0 18px; border: 0; border-radius: var(--r-btn); background: transparent; color: var(--slate); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.tl-view[aria-pressed="true"] { background: var(--white); color: var(--graphite); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tl-view:focus-visible { outline: 3px solid var(--graphite); outline-offset: 2px; }
.tl-sec { display: none; }
.tl-sec.is-view { display: block; }

/* The next change, with Done: the one thing needed on the touchline. */
.tl-next { padding: 14px 16px 12px; border-radius: var(--r-card); background: var(--white); box-shadow: inset 0 0 0 2px var(--graphite); margin-bottom: 14px; }
.tl-next__h { margin: 0 0 10px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-next__warn { margin: -4px 0 10px; font-size: 14px; line-height: 1.45; font-weight: 600; }
.tl-next__btns { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.tl-done { flex: 1 1 auto; min-height: 52px; font-size: 17px; justify-content: center; }
.tl-next__now { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--mist); font-size: 14px; line-height: 1.45; color: var(--slate); overflow-wrap: anywhere; }
.tl-next__now span { font-weight: 600; color: var(--graphite); }

.tl-io { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: baseline; }
.tl-io__l { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--slate); }
.tl-io__n { display: flex; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
.tl-name { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.tl-name:not(:last-child)::after { content: ","; }
.tl-name small { font-size: 12.5px; color: var(--steel); }
.tl-none, .tl-nochange { font-size: 15px; color: var(--steel); font-style: italic; margin: 0; }
/* Where someone coming on goes, and who moves: secondary to the names. */
.tl-to { font-size: 13.5px; font-weight: 600; color: var(--slate); white-space: nowrap; }
.tl-io__l--mv { color: var(--steel); }
.tl-io__n--mv .tl-name { font-size: 15px; color: var(--slate); }

.tl-gone { margin: 0 0 16px; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--silver); background: var(--white); }
.tl-gone > summary { min-height: 48px; padding: 13px 14px; font-size: 15px; font-weight: 600; cursor: pointer; }
.tl-gone > summary:focus-visible { outline: 3px solid var(--graphite); outline-offset: -3px; }
.tl-gone__in { padding: 0 14px 14px; }
.tl-gone__in .field__hint { margin-top: 0; }
.tl-gone__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 12px; margin: 6px 0 12px; }
.tl-gone__list .tl-tick span { overflow-wrap: anywhere; }
.tl-gone .field__warn { margin-top: 10px; }

/* The team now, on a plain pitch (positions only): calm, no colours of its own, names readable on a phone. The
   team's own end is at the bottom; each position's players along its line; the subs underneath. */
.tl-now { margin: 0 0 14px; padding: 12px 14px 14px; border-radius: var(--r-card); background: var(--white); box-shadow: inset 0 0 0 1px var(--silver); }
.tl-now__top { display: flex; align-items: baseline; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; margin-bottom: 10px; }
.tl-now__h { margin: 0; font-size: 15px; font-weight: 600; }
.tl-now__from { font-size: 13.5px; color: var(--slate); font-variant-numeric: tabular-nums; }
.tl-pitch { margin: 0 auto; max-width: 340px; }
.tl-pitch__f { position: relative; aspect-ratio: 5 / 6; border-radius: 8px; background: var(--mist); }
.tl-pitch__m { position: absolute; left: 0; top: 0; width: 100%; height: 100%; fill: none; stroke: var(--white); stroke-width: 0.9; }
.tl-pline { position: absolute; left: 0; right: 0; height: 0; }
.tl-pslots { list-style: none; margin: 0; padding: 0; }
.tl-pslot { position: absolute; top: -8px; text-align: center; }
/* Each place is labelled with its position (LB, CB…): a small dark tag where the dot was. */
.tl-pdot { display: block; width: max-content; min-width: 22px; height: 16px; margin: 0 auto 1px; padding: 0 4px; border-radius: 8px; background: var(--graphite); border: 1.5px solid var(--white); box-sizing: border-box; color: var(--white); font-size: 9px; line-height: 13px; font-weight: 600; letter-spacing: .03em; }
.tl-pn { display: block; padding: 0 3px; font-size: 13px; line-height: 1.2; font-weight: 600; color: var(--graphite); overflow-wrap: normal; word-break: normal; }
.tl-pn--cut { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-pitch__subs { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: baseline; margin-top: 12px; }
.tl-pitch__subs .tl-name { font-size: 15px; }

/* The match, start to full time. */
.tl-line { list-style: none; margin: 0; padding: 0; }
.tl-ev { position: relative; padding: 12px 0 12px 18px; border-left: 2px solid var(--silver); }
.tl-ev::before { content: ""; position: absolute; left: -6px; top: 17px; width: 10px; height: 10px; border-radius: 50%; background: var(--white); box-shadow: inset 0 0 0 2px var(--graphite); }
.tl-ev--brk::before { border-radius: 2px; }
.tl-ev.is-done { color: var(--slate); }
.tl-ev.is-done::before { background: var(--graphite); }
.tl-ev.is-done .tl-name { color: var(--slate); }
.tl-ev.is-next::before { width: 14px; height: 14px; left: -8px; top: 15px; background: var(--graphite); }
.tl-ev__h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-ev--brk .tl-ev__h { text-transform: none; }
.tl-ev__done { font-size: 12.5px; font-weight: 600; color: var(--steel); }
.tl-ev--end { padding-bottom: 4px; }

/* Players: each player's minutes and when they're on. */
.tl-players { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 28px; }
.tl-pl { padding: 10px 0; border-bottom: 1px solid var(--mist); min-width: 0; }
.tl-pl__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tl-pl__n { font-size: 16px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.tl-pl__m { flex: none; font-size: 16px; font-variant-numeric: tabular-nums; }
.tl-pl__on, .tl-pl__own { margin: 3px 0 0; font-size: 13.5px; line-height: 1.4; color: var(--slate); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tl-pl__own { color: var(--steel); }

.tl-psec { display: none; }

.tl-send { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tl-send h2 { margin: 0; color: var(--slate); }
.tl-send__btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Tablet and wider (a set-up form this wide): the players in two columns, an open panel across both, its number
   fields a comfortable width. */
@media (min-width: 720px) {
  .tl-plist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
  .tl-pr, .tl-pr + .tl-pr, .tl-pp + .tl-pr { box-shadow: inset -1px 0 0 var(--mist), inset 0 -1px 0 var(--mist); }
  .tl-pp { grid-column: 1 / -1; margin: 8px; }
  .tl-pp .tl-nums { max-width: 440px; }
  .tl-pp .tl-pk__f { max-width: 440px; }
}
/* Tablet: the next change and the team now side by side, the match below. */
@media (min-width: 720px) and (max-width: 1099px) {
  .tl-side.has-pitch { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 270px); grid-template-rows: auto 1fr; gap: 0 18px; align-items: start; }
  .tl-side.has-pitch .tl-next { grid-column: 1; grid-row: 1; }
  .tl-side.has-pitch .tl-gone { grid-column: 1; grid-row: 2; }
  .tl-side.has-pitch .tl-now { grid-column: 2; grid-row: 1 / span 2; }
}
/* Desktop: the next change (with Done), the team now and "Someone can't carry on?" stay in view beside the match. */
@media (min-width: 1100px) {
  .tl-sec[data-view="match"].is-view { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 0 28px; align-items: start; }
  .tl-side { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .tl-side .tl-pitch { max-width: 290px; }
  .tl-line { padding-top: 2px; }
}

@media (max-width: 380px) {
  .tl-pn { font-size: 12px; }
  /* the picker keeps 44-pixel targets on the narrowest phones */
  .tl-pp { margin: 0 2px 8px; padding: 12px; }
  .tl-pk__grid { padding: 6px; gap: 5px; }
  .tl-pk__row { gap: 5px; }
}
@media (max-width: 560px) {
  .tl-views { display: flex; }
  .tl-view { flex: 1 1 0; }
  .tl-send__btns { width: 100%; }
  .tl-send__btns .btn { width: 100%; justify-content: center; min-height: 44px; }
}

/* ---------- paper: the lineup, the changes and the minutes, nothing else ---------- */
@media print {
  .tl-summary { display: none; }
  .tl-psec { display: block; margin-bottom: 6mm; }
  .tl-psec[data-pdf-out] { display: none; }
  .tl-psec__h { margin: 0 0 2.5mm; font-size: 12pt; font-weight: 600; break-after: avoid; }
  .tl-pstart { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin-bottom: 5mm; break-inside: avoid; }
  .tl-pstart h4 { margin: 0 0 1mm; font-size: 8pt; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--slate); }
  .tl-pstart p { margin: 0; font-size: 10pt; line-height: 1.4; overflow-wrap: anywhere; }
  .tl-ptab { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9.5pt; line-height: 1.35; }
  .tl-ptab th, .tl-ptab td { padding: 1.6mm 2mm; text-align: left; vertical-align: top; border-bottom: 0.5pt solid var(--silver); overflow-wrap: anywhere; }
  .tl-ptab thead th { font-size: 8pt; font-weight: 600; border-bottom: 1pt solid var(--graphite); }
  .tl-ptab thead th:first-child { width: 46mm; }
  .tl-ptab--min thead th:first-child { width: 52mm; }
  .tl-ptab tbody th { width: 46mm; font-weight: 600; font-variant-numeric: tabular-nums; }
  .tl-ptab__brk th, .tl-ptab__brk td { border-top: 1pt solid var(--graphite); }
  .tl-ptab small { font-size: 7.5pt; color: var(--steel); }
  .tl-ptab tr { break-inside: avoid; }
  .tl-ptab--min tbody th { width: 52mm; }
  .tl-ptab--min tbody th small { display: block; font-weight: 400; }
  .tl-ptab--min td:nth-child(2) { width: 18mm; font-variant-numeric: tabular-nums; }
  .tl-pmv { display: block; margin-top: 0.8mm; font-size: 8pt; color: var(--slate); }
  .tl-pdl { display: grid; grid-template-columns: auto 1fr; gap: 0.6mm 3mm; margin: 0; font-size: 10pt; line-height: 1.4; }
  .tl-pdl dt { font-size: 8pt; font-weight: 600; color: var(--slate); padding-top: 0.4mm; }
  .tl-pdl dd { margin: 0; overflow-wrap: anywhere; }
  .tl-ptab--min thead th:nth-child(2) { width: 18mm; }
  /* The starting shape (positions): in place of the written starting lineup, beside the changes when both are chosen. */
  .tl-shape-on .tl-pstartw { display: none; }
  .tl-shape-side .tl-pwrap { display: grid; grid-template-columns: 58mm minmax(0, 1fr); gap: 0 7mm; align-items: start; }
  .tl-shape-side .tl-pwrap .tl-ptab thead th:first-child, .tl-shape-side .tl-pwrap .tl-ptab tbody th { width: 27mm; }
  .tl-psec--shape .tl-pitch { max-width: 58mm; margin: 0; }
  .tl-pitch--paper { break-inside: avoid; }
  .tl-pitch--paper .tl-pitch__f { border-radius: 2mm; }
  .tl-pitch--paper .tl-pitch__m { stroke-width: 0.8; }
  .tl-pitch--paper .tl-pslot { top: -1.7mm; }
  .tl-pitch--paper .tl-pdot { min-width: 5mm; height: 3.4mm; margin-bottom: 0.4mm; padding: 0 0.8mm; border-radius: 1.7mm; border-width: 0.3mm; font-size: 5.5pt; line-height: 2.8mm; }
  .tl-pitch--paper .tl-pn { font-size: 7pt; line-height: 1.15; overflow-wrap: anywhere; } /* the names are fitted to their place; this only catches what can't be */
  .tl-pitch--paper .tl-pitch__subs { gap: 0.8mm 2.5mm; margin-top: 2mm; }
  .tl-pitch--paper .tl-pitch__subs .tl-io__l { font-size: 6pt; }
  .tl-pitch--paper .tl-pitch__subs .tl-name { font-size: 8pt; }
  .tl-pitch--paper .tl-pitch__subs .tl-name small { font-size: 6.5pt; }
  /* The team after each change: after everything else; small pitches, three to a row, a row never split across pages. */
  .tl-pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5mm 6mm; }
  .tl-pcard .tl-pitch { max-width: 52mm; margin: 0; }
  .tl-pcard { break-inside: avoid; min-width: 0; }
  .tl-pcard__h { margin: 0 0 1.5mm; font-size: 9pt; font-weight: 600; font-variant-numeric: tabular-nums; }
}
