/* C151 launch polish: Home, Today's training, rating goal, My stats and Profile micro-details.
   Remove this file's <link> in index.html to get the previous look back. Tokens only (dark + light). */

/* ---------- Home: Today's training hero ---------- */
.hm-nw { white-space: nowrap; }                                   /* "2 endgames" never splits over two lines */
.hm-ts .hm-ts-line { text-wrap: pretty; }
.hm-ts .hero-go > span { min-width: 0; text-wrap: balance; }
.hm-len { min-height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.hm-len:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }

/* ---------- Home: "Inside:" links under each area card: wrap as calm chips, no dangling " · " at a line end ---------- */
.hm-inside { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.hm-inside > span[aria-hidden="true"] { display: none; }
.hm-inside > span:first-child { flex-basis: 100%; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.hm-inside a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: var(--radius-pill, 999px);
  background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 800; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent;
}
.hm-inside a:hover { color: var(--text); border-color: var(--border); }
@media (pointer: coarse) { .hm-inside a { min-height: 44px; } }

/* ---------- Home rows / folds: clear keyboard focus ---------- */
.hm-row:focus-visible, .hm-fold > summary:focus-visible, .hm-more > summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: -3px; border-radius: var(--radius, 16px); }
.hm-more > summary small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Today's training: end card with real numbers ---------- */
.ts-end-stats { display: flex; justify-content: center; gap: 10px; margin: 4px 0 14px; flex-wrap: wrap; }
.ts-end-stat { min-width: 84px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); display: grid; gap: 2px; }
.ts-end-stat b { font-size: 24px; line-height: 1.1; font-weight: var(--fw-heavy, 900); color: var(--text); font-variant-numeric: tabular-nums; }
.ts-end-stat b small { font-size: 14px; color: var(--text-2); font-weight: 800; }
.ts-end-stat span { font-size: 12px; font-weight: 800; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.ts-end-card .ts-end-streak { font-weight: 800; color: var(--text); }
.ts-end-card .btn { min-height: 48px; }

/* ---------- Session bar: 44px controls ---------- */
.ts-bar .ts-btn, .ts-bar .ts-x { min-height: 44px; min-width: 44px; }

/* ---------- Profile: Account & data rows on a phone ---------- */
/* long usernames are shown whole (no "LightningB…"); the button moves under the name when there is no room beside it */
.pf-acct { flex-wrap: wrap; row-gap: 8px; }
.pf-acct-name { flex: 1 1 170px; }
.pf-acct-name b { white-space: normal; overflow-wrap: break-word; }
.pf-acct > .btn { margin-left: auto; }

@media (prefers-reduced-motion: reduce) {
  .ts-end, .ts-end-card { animation: none !important; }
}

/* C159: Free with today's exercises used: the hero already says so with one Plus button, so the banner above does not repeat it */
#panel-home:has(.hm-hero .hero-go[data-paywall="dailyTraining"]) .hm-banner { display: none; }
