/* Report pages: same top line on Core and Edge (report name + Back to dashboard). */
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.backapp { font-weight: 600; text-decoration: none; color: var(--accent, #14346B); white-space: nowrap; }
.backapp:hover { text-decoration: underline; }
/* Phone layout for the app pages (dashboard, reports, setup). Loaded after the page styles. */
@media (max-width: 640px) {
  .portal-band, .panel { padding-left: 14px; padding-right: 14px; }
  img, svg, canvas { max-width: 100%; height: auto; }
  table { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
  /* Jump links wrap onto several lines (same on Core and Edge reports). */
  nav.core-toolbar { flex-wrap: wrap; gap: 4px 18px; }
  nav.core-toolbar a { white-space: nowrap; padding: 8px 4px; }
  /* Comfortable tap targets. */
  .btn, button, details > summary { min-height: 44px; }
  details > summary { display: flex; align-items: center; }
  .actions .btn, .btns .btn, .account-actions .btn, .core-toolbar .btn { width: 100%; margin: 4px 0; justify-content: center; }
  /* 16px inputs stop iPhone from zooming in on focus. */
  input, select, textarea { font-size: 16px; max-width: 100%; }
  .core-overview { display: block; }
  .core-score { margin: 0 auto 14px; }
  .report-gold-bar { padding: 12px 14px; }
  .core-finding h4 { font-size: 1rem; line-height: 1.35; }
  .core-review-form .btn { width: 100%; }
}
/* Installed app: keep content clear of the phone's status bar and home indicator. */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
}
