/* Workout cards for the Athlete Rating (SPEC 72 section 4t, training_cards.py): a test's name as the button that opens its
   card, and the card, a small whiteboard card in Training's style (the piece cards' title face, chips and lines). The
   site's tokens for every colour (style.css :root, light and dark), so both themes keep at least 4.5:1 text. */

/* the test's name: still the name, with the dotted underline Training's demo links have (tap to see) */
.trw-name-wrap { min-width: 0; }
.trw-name { display: inline; padding: 0; margin: 0; border: 0; background: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer; text-decoration: underline dotted; text-decoration-color: var(--text-2);
  text-underline-offset: 3px; text-decoration-thickness: 1.5px; overflow-wrap: anywhere; }
.trw-name:hover { text-decoration-style: solid; text-decoration-color: currentColor; }
.trw-name:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* touch screens: a 44 px target that doesn't move the row (style.css's "Touch screens", 2026-10-29) */
@media (pointer: coarse) {
  .trw-name { display: inline-block; min-width: 44px; min-height: 44px; padding-block: 12.5px; margin-block: -12.5px; }
}

/* the card */
.trw-card { width: min(440px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; }
@supports (height: 100dvh) { .trw-card { max-height: calc(100dvh - 24px); } }
.trw-card-body { display: grid; gap: 12px; padding: 18px 20px 20px; }
.trw-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.trw-card-title { margin: 0; padding-top: 4px; font-family: var(--font-display); font-size: 26px; font-weight: 700;
  letter-spacing: .01em; line-height: 1.1; overflow-wrap: anywhere; }
.trw-card-close { flex: none; margin: -4px -8px 0 0; }
.trw-card-marks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.trw-chip { font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface-2);
  color: var(--text); line-height: 1.3; }
.trw-scored { background: var(--accent-soft); color: var(--accent-text); }
.trw-card-lines { display: grid; gap: 2px; margin: 0; padding: 12px 14px; list-style: none; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--line); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.trw-card-lines li { padding: 1px 0; }
.trw-card-standard { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text); }
.trw-card-loads { margin: 0; font-size: 13px; color: var(--text-2); }

/* Log an extra workout: "See the workout" under the Benchmark list */
.trw-picker { margin: 8px 0 0; }
.trw-picker[hidden] { display: none; }

/* Admin › Training › Rating › Workout cards: each group a drop-down, a form per test */
.trw-admin-group { border-top: 1px solid var(--line); }
.trw-admin-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px;
  padding: 8px 0; cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; }
.trw-admin-summary::-webkit-details-marker { display: none; }
.trw-admin-summary .icon { transition: transform .15s; color: var(--text-2); }
.trw-admin-group[open] > .trw-admin-summary .icon { transform: rotate(180deg); }
.trw-admin-summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.trw-admin-test { display: grid; gap: 6px; padding: 12px 0 16px; border-top: 1px dashed var(--line); scroll-margin-top: 80px; }
.trw-admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.trw-admin-head h3 { margin: 0; font-size: 15px; }
.trw-admin-badge { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2);
  color: var(--text-2); }
.trw-admin-badge.is-pending { background: var(--accent-soft); color: var(--accent-text); }
.trw-admin-test textarea { width: 100%; min-height: 80px; font: 14px/1.5 var(--font); resize: vertical; }
.trw-admin-sources { margin: 0; font-size: 12.5px; color: var(--text-2); overflow-wrap: anywhere; }
.trw-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (pointer: coarse) { .trw-admin-test textarea { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .trw-admin-summary .icon { transition: none; } }

@media (prefers-reduced-motion: reduce) { .trw-card[open] { animation: none; } }
