/* Reflow the existing dashboard content on phones instead of shrinking its text. */
.home-dashboard .hpd-mobile-label { display: none; }
@media (max-width: 768px) {
  .home-dashboard,
  .home-dashboard.is-scaled { aspect-ratio: auto; overflow: visible; }
  .home-dashboard .home-dashboard__canvas,
  .home-dashboard.is-scaled .home-dashboard__canvas {
    position: relative;
    width: 100% !important; /* Supersede the imported artboard's inline dimensions. */
    height: auto !important;
    transform: none;
  }
  .page-homepage .hp-dashboard-panel { padding: 0; }
  .home-dashboard .hpd-win-bar { height: 30px; padding-inline: 14px; gap: 6px; }
  .home-dashboard .hpd-dot { width: 8px; height: 8px; }
  .home-dashboard .hpd-win-body,
  .home-dashboard .hpd-win-body.hpd-small { padding: 20px 16px; gap: 24px; }
  .home-dashboard .hpd-win-head { flex-direction: column; align-items: flex-start; gap: 5px; }
  .home-dashboard .hpd-win-title { font-size: 18px; white-space: normal; }
  .home-dashboard .hpd-win-meta { font-size: 12px; white-space: normal; }
  .home-dashboard .hpd-stat-value { font-size: 34px; white-space: normal; }
  .home-dashboard .hpd-stat-unit { font-size: 14px; }
  .home-dashboard .hpd-row-text,
  .home-dashboard .hpd-row-value { font-size: 14px; }
  .home-dashboard .hpd-stat-sub { font-size: 13px; }

  .home-dashboard--hero .hpd-hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .home-dashboard--hero .hpd-hero-metric { padding: 12px; }
  .home-dashboard--hero .hpd-hero-metric .hpd-stat-value { font-size: 28px; }
  .home-dashboard--hero .hpd-hero-metric .hpd-stat-unit { display: block; margin: 4px 0 0; font-size: 12px; }
  .home-dashboard--hero .hpd-hero-metric--return { grid-column: 1 / -1; }
  .home-dashboard--hero .hpd-hero-metric--return .hpd-stat-value { font-size: 34px; }
  .home-dashboard--hero .hpd-hero-rows { gap: 14px; }
  .home-dashboard--hero .hpd-hero-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .home-dashboard--hero .hpd-hero-row .hpd-row-text { grid-column: 1; }
  .home-dashboard--hero .hpd-hero-row .hpd-row-value { grid-column: 2; grid-row: 1; }
  .home-dashboard--hero .hpd-hero-row .hpd-bar { grid-column: 1 / -1; grid-row: 2; height: 10px; }

  .home-dashboard--spend .hpd-motion-stage {
    grid-template-columns: 10px minmax(0, 1fr) 36px 66px !important;
    gap: 8px !important;
  }
  .home-dashboard--spend .hpd-row-muted { font-size: 13px; }

  /* Keep the semantic table and all metrics; each department becomes a compact block. */
  .home-dashboard--leaderboard .hpd-tbl { display: block; }
  .home-dashboard--leaderboard colgroup { display: none; }
  .home-dashboard--leaderboard thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .home-dashboard--leaderboard :is(tbody, tfoot) { display: block; }
  .home-dashboard--leaderboard tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid #e6e9f0; }
  .home-dashboard--leaderboard tbody tr:first-child { padding-top: 0; }
  .home-dashboard--leaderboard .hpd-tbl td,
  .home-dashboard--leaderboard .hpd-tbl td:not(:first-child) { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 0; border: 0; font-size: 16px; text-align: left; white-space: normal; }
  .home-dashboard--leaderboard td:first-child { grid-column: 1 / -1; font-weight: 600; }
  .home-dashboard--leaderboard td:nth-child(2) > span:not(.hpd-mobile-label) { display: flex !important; width: 100%; }
  .home-dashboard--leaderboard .hpd-bar { flex: 1; width: auto !important; }
  .home-dashboard--leaderboard .hpd-mobile-label { display: block; color: #6b7585; font-size: 12px; font-weight: 400; }
  .home-dashboard--leaderboard td:first-child .hpd-mobile-label { display: none; }
  .home-dashboard--leaderboard tfoot tr { border-bottom: 0; padding-bottom: 0; }

  .home-dashboard--developer .hpd-developer-summary { gap: 12px !important; }
  .home-dashboard--developer .hpd-developer-summary > .hpd-stat { padding: 0 !important; }
  .home-dashboard--developer .hpd-developer-summary > .hpd-divider { padding-left: 12px !important; }
  .home-dashboard--developer .hpd-developer-summary .hpd-delta { display: block; margin: 6px 0 0; }
  .home-dashboard--developer svg text { font-size: 24px; }

  /* The same five fluency scores become horizontal bars, as on the earlier mobile page. */
  .home-dashboard--adoption .hpd-fluency-plot { height: auto !important; display: grid !important; gap: 14px !important; border: 0 !important; }
  .home-dashboard--adoption .hpd-fluency-benchmark,
  .home-dashboard--adoption .hpd-fluency-axis { display: none !important; }
  .home-dashboard--adoption .hpd-fluency-company { position: static !important; padding: 0 !important; font-size: 13px !important; }
  .home-dashboard--adoption .hpd-fluency-row { display: grid !important; grid-template-columns: 90px minmax(0, 1fr); align-items: center !important; gap: 8px; }
  .home-dashboard--adoption .hpd-mobile-label { display: block; font-size: 13px; line-height: 1.4; }
  .home-dashboard--adoption .hpd-motion-column { width: var(--fluency-fill) !important; min-width: 32px; height: 26px !important; padding: 0 !important; align-items: center !important; border-radius: 3px !important; }

  .home-dashboard--workflow .hpd-workflow-row { grid-template-columns: minmax(0, 1fr) auto !important; gap: 8px 12px !important; }
  .home-dashboard--workflow .hpd-motion-stage .hpd-tag { grid-column: 1 / -1; justify-self: start; }
  .home-dashboard--workflow .hpd-motion-stage .hpd-row-text { grid-column: 1; }
  .home-dashboard--workflow .hpd-motion-stage .hpd-row-value { grid-column: 2; }
}
