/* Trainer Home, Insights, Briefs list and Programmes (pages/dashboard.html, insights.html, briefs.html, programmes.html).
   CP 16 Sep 2026: Programmes follows the Fiverr seller "Gigs" layout; the metric tiles on Insights follow "Level overview".
   CP 24 Sep 2026 (Page 2 deck): the Home is a priority queue (.queue); the profile card, benefits and count-card rules went with it. Kept out of components.css
   for the same reason as board.css and resources.css. Everything here scopes to .ov (Overview) or .plist
   (Programmes; .prog is taken by the programme page card in components.css). Tokens, .card, .stat, .faq, .table and .tabs come from styles.css and components.css. */

/* ---------- Overview ---------- */

/* Grey band behind the greeting; the two cards below overlap its foot, as Fiverr's avatar card does. */
.ov-band          { background: color-mix(in oklab, var(--grey-200) 55%, var(--canvas)); padding-block: 2rem 4.5rem; }
.ov-band .display-lg { margin: 0; }
.ov-band__link    { display: inline-flex; align-items: center; gap: 0.375rem; font-size: var(--text-body-sm); font-weight: 500; color: var(--primary); }
.ov-band__link svg { width: 1rem; height: 1rem; }
.ov-body          { margin-top: -2.5rem; padding-bottom: 5rem; }
.ov-body > * + *  { margin-top: 2rem; }

/* Card head: title + one line of frame, optional link on the right. */
.ov-card__head    { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ov-card__head p  { margin-top: 0.25rem; font-size: var(--text-body-sm); color: var(--muted-foreground); }

/* Metric tiles inside the metrics card. Bordered, not shadowed: they sit on a card already (no nested shadow). */
.metrics          { display: grid; gap: 0.875rem; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 1.25rem; } /* CP 17 Sep (mobile review): two-up from phone width; one per row cost 3.5 screens before Briefs. */
@media (min-width: 1100px) { .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.metric           { border: 1px solid var(--grey-200); border-radius: var(--radius-lg); padding: 1.125rem 1.25rem; min-width: 0; text-decoration: none; color: inherit; }
a.metric          { transition: border-color .15s, box-shadow .15s; }
@media (hover: hover) { a.metric:hover { border-color: var(--navy-200); box-shadow: var(--shadow-sm); } }
.metric__label    { font-size: var(--text-body-sm); font-weight: 500; color: var(--muted-foreground); }
.metric__value    { margin-top: 0.5rem; font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; line-height: 1; letter-spacing: -0.5px; color: var(--primary); font-variant-numeric: tabular-nums; }
.metric__value--sm { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.3px; } /* a figure with words in it ("9 hours", "1 filed · 1 paid"): one size down so it never wraps */
.metric__value--text { font-family: var(--font-sans); font-size: var(--text-subheading); font-weight: 600; line-height: 1.35; letter-spacing: -0.1px; color: var(--muted-foreground); }
.metric__note     { margin-top: 0.5rem; font-size: var(--text-caption); color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
/* Range bar (Fiverr): the trainer's figure fills the track, the platform average is a marker on it. Only on tiles where both are percentages. */
.metric__bar      { position: relative; margin-top: 0.75rem; height: 0.25rem; border-radius: var(--radius-full); background: var(--grey-200); overflow: visible; }
.metric__fill     { height: 100%; border-radius: inherit; background: var(--primary); }
.metric__mark     { position: absolute; top: -0.25rem; width: 2px; height: 0.75rem; margin-left: -1px; background: var(--secondary); border-radius: 1px; }
.metric__scale    { display: flex; justify-content: space-between; margin-top: 0.375rem; font-size: var(--text-overline); color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
@media (max-width: 639px) { .metrics { gap: 0.625rem; grid-auto-rows: 1fr; } /* CP 19 Sep (mobile): rows share one height, so a lone tile in the last row matches the pair above. */ .metric { padding: 0.875rem 0.75rem; } .metric__value { font-size: 1.25rem; } .metric__scale { justify-content: center; } .metric__scale span:first-child, .metric__scale span:last-child { display: none; } } /* phone tile is ~130px inside: value one step down, scale keeps the platform figure only */

.is-launch .attention__card[data-launch] { display: flex !important; } /* trainer Overview (4 Oct): the launch switch reverts display, cards must stay flex */
/* ---------- Home queue (Page 2 deck, CP 24 Sep) ---------- */
/* One flat list in score order. Row = icon, what + who, one badge, one action. White rows, like the attention cards were. */
.queue            { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.queue__item      { display: flex; align-items: center; gap: 0.875rem; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 0.875rem 1.25rem; }
.queue__item > .icon-tile { width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); flex-shrink: 0; }
.queue__item > .icon-tile svg { width: 1.125rem; height: 1.125rem; }
.queue__body      { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 0.125rem; }
.queue__title     { font-weight: 600; }
.queue__meta      { font-size: var(--text-body-sm); color: var(--muted-foreground); }
.queue__badge     { flex-shrink: 0; font-size: var(--text-caption); font-weight: 600; white-space: nowrap; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.queue__badge--now  { color: var(--coral); }
.queue__badge--soon { color: var(--amber-700); }
.queue__action    { flex-shrink: 0; font-size: var(--text-body-sm); font-weight: 600; color: var(--primary); text-decoration: none; white-space: nowrap; }
@media (hover: hover) { .queue__action:hover { text-decoration: underline; text-underline-offset: 3px; } }
@media (max-width: 639px) {
  .queue__item    { flex-wrap: wrap; row-gap: 0.375rem; }
  .queue__body    { flex-basis: calc(100% - 3.125rem); }   /* icon + gap */
  .queue__badge   { margin-left: 3.125rem; }
  .queue__action  { margin-left: auto; }
}
.queue__item.is-muted { opacity: 0.72; }
.queue__item > .pill { flex-shrink: 0; } /* state pill on a programme row (CP 4 Oct: colour) */ /* resolved, read only (Work, 4 Oct) */
/* States 2 and 3: a calm card, not a blank page. */
.queue-empty      { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 2rem 1.5rem; text-align: center; }
.queue-empty p    { margin: 0; }
.queue-empty a    { color: var(--primary); font-weight: 600; text-decoration: none; }
@media (hover: hover) { .queue-empty a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.queue-empty__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-top: 0.75rem; }

/* ---------- Briefs list (pages/briefs.html). The 16 Sep ribbon went in the 24 Sep Work pass; the tab row uses .plist__bar. ---------- */
/* Availability strip (Work, CP 24 Sep): icon, the setting and its consequence, a switch on the right. Same white row as the Home queue. */
.avail            { display: flex; align-items: center; gap: 0.875rem; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 0.875rem 1.25rem; }
.avail > .icon-tile { width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); flex-shrink: 0; }
.avail > .icon-tile svg { width: 1.125rem; height: 1.125rem; }
.avail__body      { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.avail__meta      { font-size: var(--text-body-sm); color: var(--muted-foreground); }
.switch           { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; }
.switch input     { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track    { position: relative; width: 2.75rem; height: 1.5rem; border-radius: var(--radius-full); background: var(--grey-300); transition: background .15s; }
.switch__track::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: transform .16s var(--ease-out); }
.switch input:checked + .switch__track { background: var(--primary); }
.switch input:checked + .switch__track::after { transform: translateX(1.25rem); }
.switch input:focus-visible + .switch__track { outline: 2px solid var(--primary); outline-offset: 2px; }
.status-tabs.status-tabs--tight button, .status-tabs.status-tabs--tight a { padding-inline: 0.5rem; } /* six tabs on one row inside the 4xl container (Work pass, 24 Sep) */
[data-status-panel] .brief-card[hidden] { display: none; }
[data-status-panel] .brief-card + .brief-card[hidden] + .brief-card { margin-top: 1rem; }

/* ---------- Programmes ---------- */

.plist            { padding-top: 1.5rem; padding-bottom: 6rem; }
/* CP 17 Sep: status tabs and the one action share a row; the bar carries the rule the tabs used to. h1 is sr-only (the tab names the page). */
.plist__bar        { display: flex; align-items: flex-end; gap: 1rem; margin-top: 1.25rem; border-bottom: 1.5px solid var(--grey-200); }
.plist__bar .status-tabs { flex: 1 1 auto; min-width: 0; margin-top: 0; border-bottom: 0; }
.plist__add        { flex-shrink: 0; margin-bottom: 0.5rem; }
@media (max-width: 639px) {
  .plist__bar      { flex-wrap: wrap; }
  .plist__add      { order: -1; width: 100%; margin-bottom: 0.25rem; }
}
.plist__foot--builder { margin-top: 0.375rem; }

/* Status tabs (Fiverr Gigs): uppercase, underline on the active one, a count chip on every tab (CP 16 Sep: the tally lives here, not in a foot line).
   A second tab row under the account tabs; smaller and uppercase so the two never read as one. */
.status-tabs      { display: flex; gap: 0.25rem; margin-top: 1.25rem; border-bottom: 1.5px solid var(--grey-200); overflow-x: auto; scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs--wrap { flex-wrap: wrap; overflow: visible; } /* eight stage tabs (Work, 4 Oct): wrap rather than scroll */
.status-tabs button, .status-tabs a { appearance: none; text-decoration: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1.5px; padding: 0.625rem 0.875rem; white-space: nowrap; flex-shrink: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--text-caption); font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted-foreground); transition: color .15s, border-color .15s; }
.status-tabs button[aria-selected="true"], .status-tabs a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--primary); }
@media (hover: hover) { .status-tabs button:hover, .status-tabs a:hover { color: var(--foreground); } }
.status-tabs .count { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding-inline: 0.375rem; border-radius: var(--radius-full); background: var(--grey-200); color: var(--grey-600); font-size: var(--text-overline); letter-spacing: 0; }
.status-tabs button[aria-selected="true"] .count { background: var(--accent-active); color: var(--primary); }

/* Panel: card with a head line (panel title left, range select right) and the table flush inside. */
.plist-panel       { margin-top: 1.25rem; background: var(--card); border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.plist-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--grey-100); }
.plist-panel__title { font-size: var(--text-subheading); font-weight: 600; } /* H4, sentence case (17 Oct sweep; was 12px caps) */
.plist-panel .select { margin-top: 0; width: auto; min-height: 2.25rem; padding-block: 0.25rem; font-size: var(--text-caption); font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; }
.plist-panel .table-wrap { position: relative; margin-top: 0; border: 0; border-radius: 0; } /* relative: the .sr-only header text is absolute and would otherwise widen the page on phones */
.plist-panel table.table { min-width: 48rem; } /* six columns; the title column keeps a readable width and the wrap scrolls on phones */
.plist-panel .table th:first-child, .plist-panel .table td:first-child { padding-left: 1.25rem; }
.plist-panel .table th:last-child, .plist-panel .table td:last-child { padding-right: 1.25rem; }
.plist-panel .table th { white-space: nowrap; }
.plist-panel .table td { vertical-align: middle; }
.plist-panel .table td.num { color: var(--grey-800); font-weight: 500; }
.plist-panel .table td.num.is-empty { color: var(--grey-400); font-weight: 400; } /* "–": the figure does not exist yet (Phase 3), not a zero */
.plist-row__title  { font-weight: 600; color: var(--grey-800); }
.plist-row__title a { text-decoration: none; }
@media (hover: hover) { .plist-row__title a:hover { text-decoration: underline; text-underline-offset: 3px; } }
.plist-row__meta   { margin-top: 0.125rem; font-size: var(--text-caption); color: var(--muted-foreground); }
.plist-row__actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; white-space: nowrap; }
.plist-row__actions .btn-link { font-size: var(--text-body-sm); }
.plist-panel .table tr[hidden] { display: none; }
.plist-panel__empty { padding: 1.25rem; font-size: var(--text-body-sm); color: var(--muted-foreground); }
.plist__foot       { margin-top: 1rem; font-size: var(--text-body-sm); color: var(--muted-foreground); }
.plist__foot a     { color: var(--primary); font-weight: 500; }

/* Phones (CP 17 Sep): the tables stack instead of scrolling sideways. Each row = title block, then the
   figures inline with their label, then the actions on the right. The change table stacks its cells as blocks. */
@media (max-width: 639px) {
  .plist-panel__head { flex-wrap: wrap; }
  .plist-panel .table-wrap { overflow: visible; mask-image: none; }
  .plist-panel table.table, .plist-panel tbody { display: block; min-width: 0; }
  .plist-panel thead { display: none; }
  .plist-panel .table tr { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; padding: 0.875rem 1.25rem; border-top: 1px solid var(--grey-100); }
  .plist-panel .table tr:first-child { border-top: 0; }
  .plist-panel .table td, .plist-panel .table td:first-child, .plist-panel .table td:last-child { display: block; padding: 0; border: 0; }
  .plist-panel .table td:first-child { flex: 0 0 100%; margin-bottom: 0.375rem; }
  .plist-panel .table td.num { font-size: var(--text-caption); text-align: left; white-space: nowrap; }
  .plist-panel .table td.num::before { color: var(--muted-foreground); font-weight: 400; }
  [data-status-panel="active draft paused"] td:nth-child(2)::before { content: "Views "; }
  [data-status-panel="active draft paused"] td:nth-child(3)::before { content: "Enquiries "; }
  [data-status-panel="active draft paused"] td:nth-child(4)::before { content: "Bookings "; }
  .plist-panel .table td:last-child { margin-left: auto; }
  [data-status-panel="change"] td:nth-child(2), [data-status-panel="change"] td:nth-child(3) { flex: 0 0 100%; font-size: var(--text-body-sm); }
  [data-status-panel="change"] td:nth-child(3)::before { content: "Why: "; color: var(--muted-foreground); }
  .ov-band { padding-block: 1.5rem 3.5rem; }
  .ov-body { margin-top: -2rem; }
}

/* Programme status as stage tiles (CP 4 Oct, colour). The tile is a button here, so it needs the button reset; the
   selected tile borrows the aria-current border. Colours: one per programme state. */
button.stage-tile { appearance: none; font: inherit; text-align: left; cursor: pointer; border: 1px solid transparent; }
.stage-tile[aria-selected="true"] { border-color: color-mix(in oklab, var(--stage, var(--primary)) 55%, var(--border)); background: color-mix(in oklab, var(--stage, var(--primary)) 6%, var(--card)); }
[data-stage="active"] { --stage: var(--success); }
[data-stage="draft"]  { --stage: var(--violet); }
[data-stage="paused"] { --stage: var(--warning); }
[data-stage="change"] { --stage: var(--primary); }
.stage-tile[data-stage] .stage-tile__count { color: var(--stage); }
.stage-strip--work { grid-auto-columns: minmax(7rem, 1fr); } /* Work (briefs.html, 21 Oct): eight tiles on one row inside the 5xl container */
