/* Dashboard: Start first, a compact week, the streak, Your progress, then (when relevant) one offer. */
.dash-week-inline { display: none; margin: 4px 0 0; color: var(--cw-navy); font-size: .92rem; font-weight: 800; }

.dash-grid-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin-top: 18px; }
.dash-grid-next > [hidden] { display: none !important; }

/* Your progress: one tap to the Progress page, with the weekly volume as a small line. */
.dash-progress-link { grid-column: 1 / -1; position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; color: var(--cw-navy); text-decoration: none; }
.dash-progress-link:hover { color: var(--cw-navy); background: var(--cw-bg); }
.dash-progress-link__icon { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--cw-ink); border-radius: 50%; background: var(--cw-bg); }
.dash-progress-link__icon svg { width: 22px; height: 22px; }
.dash-progress-link__copy { display: grid; gap: 2px; min-width: 0; }
.dash-progress-link__copy strong { color: var(--cw-navy); font-size: 1.02rem; font-weight: 900; line-height: 1.2; }
.dash-progress-link__copy small { color: var(--cw-muted); font-size: .82rem; }
.dash-progress-link__spark { width: clamp(96px, 22vw, 220px); height: 40px; overflow: visible; }
.dash-progress-link__spark [data-progress-spark-area] { fill: var(--cw-blue-soft); }
.dash-progress-link__spark [data-progress-spark-line] { stroke: var(--cw-navy); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }

/* Home Screen invitation (hub-install.js decides when it shows). */
.hub-install-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 14px; padding-right: 52px; }
.hub-install-card__icon { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid var(--cw-ink); background: var(--cw-blue); color: var(--cw-ink); }
.hub-install-card__icon svg { width: 24px; height: 24px; }
.hub-install-card__copy { display: grid; gap: 2px; }
.hub-install-card__copy strong { color: var(--cw-navy); font-size: 1rem; font-weight: 900; line-height: 1.2; }
.hub-install-card__copy small { color: var(--cw-muted); font-size: .84rem; }
.hub-install-card .hub-cta { grid-column: 1 / -1; min-height: 44px; font-size: .8rem; }

/* Hero Project: only for members who do not own it. Discovery, not a banner ad. */
.dash-hero-project { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding-top: 26px; overflow: visible; background: var(--cw-bg); }
/* The rating and the title run the full width (two lines on a phone), the Captain sits beside the copy below. */
.dash-hero-project__head { grid-column: 1 / -1; display: grid; justify-items: start; gap: 6px; }
.dash-hero-project__copy { display: grid; justify-items: start; gap: 8px; }
.dash-hero-project h2 { margin: 0; color: var(--cw-navy); font-family: var(--cw-font-display) !important; font-size: clamp(1.2rem, 5.2vw, 1.6rem); font-weight: 900; letter-spacing: -.02em; line-height: 1; text-transform: uppercase; }
.dash-hero-project p { margin: 0; max-width: 40ch; color: var(--cw-navy); font-size: .92rem; line-height: 1.45; }
.dash-hero-project__copy { grid-column: 1; grid-row: 2; }
/* What Hero Project is, in three ticks. */
.dash-hero-project__points { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dash-hero-project__points li { position: relative; padding-left: 24px; color: var(--cw-navy); font-size: .9rem; font-weight: 600; line-height: 1.3; }
.dash-hero-project__points li::before {
  content: ''; position: absolute; left: 2px; top: .28em; width: 12px; height: 7px;
  border: solid var(--cw-navy); border-width: 0 0 3px 3px; transform: rotate(-45deg);
}
/* The Captain stays beside the copy, above the offer and the results reel that span the card. */
.dash-hero-project__art { grid-column: 2; grid-row: 2; width: 88px; height: auto; margin: -8px 0 -6px; }
.dash-hero-project > .hub-bf { grid-column: 1 / -1; margin-top: 12px; }

/* Hero Hub Pro discovery: free members only, small, closable (back after a month at most). */
.dash-pro-discover { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 14px; padding-right: 52px; }
.dash-pro-discover__icon { display: grid; place-items: center; width: 44px; height: 44px; border: 2px solid var(--cw-ink); border-radius: 50%; background: var(--cw-surface); color: var(--cw-navy); }
.dash-pro-discover__icon svg { width: 22px; height: 22px; }
.dash-pro-discover > div { display: grid; gap: 2px; }
.dash-pro-discover strong { color: var(--cw-navy); font-size: 1rem; font-weight: 900; }
.dash-pro-discover small { color: var(--cw-muted); font-size: .84rem; line-height: 1.35; }
.dash-pro-discover .hub-link { grid-column: 2; justify-self: start; }

/* Phones: a shorter hero so Start sits high, a one-line week, the streak and total side by side. */
@media (max-width: 560px) {
  .dash-welcome--image { min-height: 0; margin-bottom: 14px; padding: 26px 14px 18px; }
  /* Same captain size and place as before, in a shorter banner. */
  .dash-welcome--image::before { bottom: -60px; background-position: 60% -6px; background-size: auto 250px; }
  .dash-welcome--image > div { position: relative; z-index: 1; }
  .dash-welcome { gap: 12px; }
  .dash-welcome h1 { max-width: 230px; font-size: 1.9rem; }
  .dash-welcome p:last-child { max-width: 250px; margin-top: 6px; font-size: .92rem; line-height: 1.35; }
  .dash-welcome .dash-primary { min-height: 52px; margin-top: 4px; }

  .dash-week-card { padding: 14px 12px; }
  .dash-week-card .dash-card-head { align-items: center; flex-wrap: nowrap; margin-bottom: 10px; }
  .dash-week-card .dash-card-head h2 { display: none; }
  .dash-week-inline { display: block; }
  .dash-week-card .dash-card-head .dash-ghost-button { min-height: 36px; padding: 0 12px; font-size: .72rem; }
  .dash-week-card .dash-week-goal, .dash-week-card .dash-week-legend { display: none; }
  .dash-week-card .dash-week-body { display: block; }
  .dash-week-card .dash-week-days { gap: 5px; }
  .dash-week-card .dash-week-days li { min-height: 0; padding: 6px 2px; }
  .dash-week-card .dash-week-days small { display: none; }
  .dash-grid-week .dash-week-stat { display: none; }
  .dash-grid-week .dash-week-side { gap: 0; }
  /* Streak and total workouts: two tiles side by side. */
  .dash-streak-card { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0; padding: 0; }
  .dash-streak-card .dash-streak-icon, .dash-streak-card .dash-streak-best { display: none; }
  .dash-streak-card > div { display: grid; align-content: start; gap: 4px; min-width: 0; margin: 0; padding: 14px; border: 0; }
  .dash-streak-card > .dash-streak-total { grid-column: auto; flex-direction: column; align-items: flex-start; border-left: 2px solid rgba(244, 247, 252, .25); border-top: 0; }
  .dash-streak-card > .dash-streak-total strong { order: 0; margin: 4px 0 0; }
  .dash-streak-card > div > span:first-child { font-size: .78rem; }
  .dash-streak-card strong { font-size: 1.9rem; line-height: 1; }
  .dash-streak-card .dash-streak-total strong { font-size: 1.9rem; }
  .dash-streak-card .dash-streak-total small { display: none; }

  .dash-grid-next { gap: 14px; margin-top: 14px; }
  .dash-progress-link { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; }
  .dash-progress-link__spark { grid-column: 2 / 3; grid-row: 2; width: 100%; height: 30px; }
  .dash-progress-link > .hub-list-row__chevron { grid-row: 1 / span 2; grid-column: 3; }
  .dash-progress-link__icon { grid-row: 1 / span 2; }
}
/* Weekly flame beside the week's count. */
.dash-week-inline { align-items: center; gap: 8px; }
.dash-week-goal { position: relative; }
.dash-week-goal > .hub-flame { position: absolute; top: 0; right: 0; width: 40px; height: 40px; }
@media (max-width: 560px) { .dash-week-inline { display: flex; } }
.dash-hero-project > .hub-proof { grid-column: 1 / -1; }
