/* ==================================================
   WDHC Athlete Portal · Dashboard Premium v4
   Typography, layout, cards: top-tier polish layer
   ================================================== */

/*
 * Global type scale for the whole portal dashboard (every tab).
 * Slightly larger type for readability; layout stays compact
 * (no wide min-widths / no horizontal scroll).
 * Was 15px densify; 18px+ previously blew out 15" laptops.
 */
html:has(body.dashboard-page) {
  font-size: 16px;
}

.dashboard-page {
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  line-height: 1.45;
  overflow-x: clip;
  max-width: 100vw;
}

/* Brighter muted text; compact sidebar default */
.dashboard-page {
  --text-secondary: #c8c8c8;
  --text-tertiary: #a8a8a8;
  --text-muted: #b5b5b5;
  --sidebar-width: 244px;
  --radius-lg: 12px;
  --radius-xl: 14px;
}

/* Type up without widening sections: keep padding/gaps as-is */
.dashboard-page .section-title,
.dashboard-page .overview-title,
.dashboard-page .card-title,
.dashboard-page .stat-card-label,
.dashboard-page .stat-card-value,
.dashboard-page .form-label,
.dashboard-page .form-input,
.dashboard-page .form-select,
.dashboard-page .form-textarea,
.dashboard-page .data-table,
.dashboard-page .btn-primary,
.dashboard-page .btn-secondary,
.dashboard-page .btn-outline,
.dashboard-page .btn-ghost,
.dashboard-page .btn-sm,
.dashboard-page .help-text,
.dashboard-page .form-hint,
.dashboard-page p,
.dashboard-page .section-subtitle,
.dashboard-page .welcome-subtitle,
.dashboard-page .tl-session-variation,
.dashboard-page .tl-session-sub,
.dashboard-page .tl-week-value,
.dashboard-page .share-card-v3-stat-label,
.dashboard-page .share-card-v3-stat-value {
  /* inherit the root bump; no extra min-width */
  min-width: 0;
}

.dashboard-page .dashboard-content,
.dashboard-page .content-section,
.dashboard-page .card,
.dashboard-page .stats-grid,
.dashboard-page .featured-hang-layout {
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* === Sidebar === */
.sidebar-brand-name { font-size: 1.22rem; }
.sidebar-brand-sub { font-size: 0.76rem; letter-spacing: 1.2px; }
.sidebar-profile-name { font-size: 1.05rem; }
.sidebar-profile-rank { font-size: 1.05rem; }
.sidebar-link {
  font-size: 0.98rem;
  padding: 8px 12px;
  gap: 10px;
}
.sidebar-icon { width: 18px; height: 18px; }
.sidebar-qs-label { font-size: 0.74rem; color: #a8a8a8; }
.sidebar-qs-value { font-size: 1.08rem; }
.sidebar-streak-label { font-size: 0.74rem; color: #a8a8a8; }
.sidebar-streak-value { font-size: 1.05rem; }
.btn-sidebar-primary,
.btn-sidebar-secondary,
.btn-sidebar-ghost {
  font-size: 0.86rem;
  padding: 9px 12px;
}

/* === Sidebar · elevated, rounded, gradient (matches overview language) === */
.dashboard-sidebar {
  border-right: none !important;
  background:
    radial-gradient(ellipse 120% 50% at 0% 0%, rgba(212, 175, 55, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 80% 40% at 100% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, #0c0c0e 0%, #070708 55%, #060606 100%) !important;
  box-shadow:
    8px 0 40px rgba(0, 0, 0, 0.35),
    inset -1px 0 0 rgba(255, 255, 255, 0.03);
}

.sidebar-inner {
  padding: 6px 8px 10px;
  gap: 0;
}

.sidebar-brand {
  border-bottom: none !important;
  border-radius: 12px;
  padding: 10px 10px 8px !important;
  margin-bottom: 4px;
  background:
    radial-gradient(ellipse 90% 80% at 0% 0%, rgba(212, 175, 55, 0.1) 0%, transparent 55%),
    linear-gradient(160deg, rgba(18, 16, 12, 0.9) 0%, rgba(8, 8, 10, 0.95) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-profile {
  border-bottom: none !important;
  border-radius: 12px;
  padding: 8px 10px !important;
  margin-bottom: 4px;
  background:
    radial-gradient(ellipse 80% 70% at 100% 0%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
    linear-gradient(165deg, rgba(16, 16, 18, 0.92) 0%, rgba(8, 8, 10, 0.96) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-profile-avatar {
  border: none !important;
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.45),
    0 8px 20px rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(circle at 30% 20%, rgba(212, 175, 55, 0.25), transparent 55%),
    rgba(212, 175, 55, 0.12) !important;
}

.sidebar-nav {
  padding: 2px 0 4px !important;
  gap: 1px !important;
}

.sidebar-link {
  border-left: none !important;
  border: none !important;
  border-radius: 8px !important;
  margin: 0;
  padding: 8px 12px !important;
  color: #c8c8c8;
  background: transparent;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  line-height: 1.3;
  font-size: 0.98rem;
}

.sidebar-link:hover {
  background:
    radial-gradient(ellipse 90% 100% at 0% 50%, rgba(212, 175, 55, 0.1) 0%, transparent 60%),
    rgba(255, 255, 255, 0.04) !important;
  color: #fff !important;
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.08);
}

.sidebar-link.active {
  background:
    linear-gradient(100deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.06) 55%, transparent 100%) !important;
  color: #f0d78c !important;
  font-weight: 600;
  box-shadow:
    0 0 24px rgba(212, 175, 55, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.2);
}

.sidebar-footer {
  border-top: none !important;
  border-radius: 12px;
  margin-top: 4px !important;
  padding: 8px !important;
  background:
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(212, 175, 55, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, rgba(14, 14, 16, 0.95) 0%, rgba(8, 8, 10, 0.98) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.sidebar-qs-item {
  border-radius: 14px !important;
  border: none !important;
  background:
    radial-gradient(ellipse 100% 80% at 50% 0%, rgba(212, 175, 55, 0.1) 0%, transparent 60%),
    rgba(255, 255, 255, 0.03) !important;
  padding: 10px 6px !important;
}

.btn-sidebar-primary {
  border-radius: 14px !important;
  border: none !important;
}

.btn-sidebar-secondary,
.btn-sidebar-ghost {
  border-radius: 14px !important;
  border: none !important;
  background:
    linear-gradient(165deg, rgba(24, 24, 26, 0.95) 0%, rgba(12, 12, 14, 0.98) 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #d0d0d0 !important;
}

.btn-sidebar-secondary:hover,
.btn-sidebar-ghost:hover {
  background:
    radial-gradient(ellipse 90% 80% at 50% 0%, rgba(212, 175, 55, 0.12) 0%, transparent 55%),
    linear-gradient(165deg, rgba(28, 26, 18, 0.96) 0%, rgba(14, 14, 16, 0.98) 100%) !important;
  color: #f0d78c !important;
}

/* === Main content · elevated ambient field === */
.dashboard-content {
  padding: 36px 40px 48px;
  background:
    radial-gradient(ellipse 100% 55% at 50% -12%, rgba(212, 175, 55, 0.1) 0%, transparent 55%),
    radial-gradient(ellipse 48% 42% at 100% 22%, rgba(205, 127, 50, 0.06) 0%, transparent 52%),
    radial-gradient(ellipse 42% 36% at 0% 68%, rgba(124, 58, 237, 0.05) 0%, transparent 52%),
    radial-gradient(ellipse 60% 40% at 70% 90%, rgba(212, 175, 55, 0.03) 0%, transparent 55%),
    linear-gradient(180deg, #0a0a0b 0%, #070708 100%);
}

/* === Welcome banner === */
/* Soft hero · no hard outline (overview also forces transparent on .overview-hero) */
.welcome-banner {
  padding: 36px 42px;
  margin-bottom: 32px;
  border-radius: var(--radius-xl);
  border: none;
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(212, 175, 55, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 50% at 0% 100%, rgba(205, 127, 50, 0.06) 0%, transparent 50%),
    linear-gradient(135deg, rgba(16, 16, 18, 0.98) 0%, rgba(8, 8, 10, 0.99) 100%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.welcome-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 4px;
}

.welcome-title {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  letter-spacing: 0.6px;
}

.welcome-subtitle {
  font-size: 0.92rem;
  color: #b8b8b8;
  margin-top: 4px;
  line-height: 1.4;
}

.welcome-chip {
  font-size: 0.82rem;
  color: #c8c8c8;
  padding: 5px 10px;
}

/* === Section headers === */
.section-title,
.overview-title {
  font-size: 1.25rem;
  letter-spacing: 0.5px;
}

.overview-subtitle {
  font-size: 0.9rem;
  color: #b8b8b8;
  line-height: 1.4;
}

.card-title,
.tier-progress-title,
.streak-card-title,
.insights-title,
.challenges-panel-title,
.gym-benchmark-title {
  font-size: 1rem;
  letter-spacing: 0.4px;
}

/* === Stat cards === */
.stats-grid {
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  padding: 14px 14px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
    linear-gradient(165deg, rgba(18, 18, 20, 0.97) 0%, rgba(10, 10, 12, 0.99) 100%);
  border: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.stat-card-icon svg { width: 18px; height: 18px; }

.stat-card-label {
  font-size: 0.75rem;
  color: #e0e0e0;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 1.55rem;
}

.stat-card[data-stat="grippage"] .stat-card-value {
  font-size: 1.7rem;
}

/* Tables, forms, buttons, lists · readable across History / Progress / You / etc. */
.dashboard-page .data-table th {
  font-size: 0.75rem;
}
.dashboard-page .data-table td {
  font-size: 0.9rem;
}
.dashboard-page .btn-primary,
.dashboard-page .btn-secondary,
.dashboard-page .btn-outline,
.dashboard-page .btn-ghost,
.dashboard-page .btn-sm {
  font-size: 0.85rem;
}
.dashboard-page label,
.dashboard-page .form-label,
.dashboard-page .help-text,
.dashboard-page .form-hint {
  font-size: 0.85rem;
}
.dashboard-page input,
.dashboard-page select,
.dashboard-page textarea {
  font-size: 0.9rem;
}
.dashboard-page .modal-title {
  font-size: 1.2rem;
}
.dashboard-page .empty-state,
.dashboard-page .section-empty,
.dashboard-page .overview-empty-copy,
.dashboard-page p {
  line-height: 1.45;
}

/* === Cards === */
.card {
  padding: 16px 18px;
  border: none;
  background:
    radial-gradient(ellipse 90% 50% at 100% 0%, rgba(255, 255, 255, 0.02) 0%, transparent 55%),
    linear-gradient(180deg, rgba(16, 16, 18, 0.98) 0%, rgba(8, 8, 10, 0.99) 100%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-radius: 14px;
}

.streak-card {
  border-color: rgba(239, 68, 68, 0.25);
  background:
    radial-gradient(ellipse 60% 50% at 100% 0%, rgba(239, 68, 68, 0.06) 0%, transparent 55%),
    linear-gradient(135deg, rgba(14, 14, 14, 0.98) 0%, rgba(20, 12, 10, 0.99) 100%);
}

.streak-card-subtitle {
  font-size: 0.98rem;
  color: #b8b8b8;
}

/* === Achievements grid === */
.achievements-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

#section-achievements .achievement-filters-wrap {
  min-width: min(100%, 520px);
}

/* Stickiness: weekly goal, near-miss, share row, season, gym */
.ach-sticky-card {
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: linear-gradient(145deg, rgba(20, 18, 10, 0.95), rgba(10, 10, 10, 0.98));
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 14px;
}
.ach-sticky-card--near {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(145deg, rgba(30, 22, 8, 0.95), rgba(10, 10, 10, 0.98));
}
.ach-sticky-title {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.85rem;
  color: #d4af37;
  margin: 0 0 6px;
}
.ach-sticky-body {
  margin: 0 0 10px;
  color: #c8c8c8;
  line-height: 1.5;
  font-size: 0.92rem;
}
.ach-near-list {
  margin: 0 0 10px;
  padding-left: 1.1rem;
  color: #ddd;
  line-height: 1.55;
  font-size: 0.9rem;
}
.ach-share-row {
  border: none;
  border-radius: 0;
  padding: 8px 0 16px;
  margin: 0 0 16px;
  background: transparent;
}
.ach-share-row-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.ach-share-row-head strong {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #eee;
  font-size: 0.9rem;
}
.ach-share-row-head span {
  color: #888;
  font-size: 0.82rem;
}
.ach-share-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 12px;
  overflow: visible;
}
/* Badge only · no chip box / square outline (glow follows medallion) */
.ach-share-chip {
  appearance: none;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 4px 2px 0;
  width: 96px;
  cursor: pointer;
  color: #ddd;
  text-align: center;
  transition: transform 0.15s ease;
  overflow: visible;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ach-share-chip:hover {
  border: none !important;
  background: transparent !important;
  transform: translateY(-3px);
}
.ach-share-chip:focus-visible {
  outline: 2px solid rgba(212, 175, 55, 0.55);
  outline-offset: 4px;
  border-radius: 50%;
}
.ach-share-chip .ach-art-badge,
.ach-share-chip .ach-medal,
.ach-share-chip .ach-badge {
  width: 72px !important;
  max-width: 72px !important;
  margin: 0 auto !important;
  overflow: visible !important;
  background: transparent !important;
}
.ach-share-chip .ach-art-frame,
.ach-share-chip .ach-art-img,
.ach-share-chip .ach-badge-face,
.ach-share-chip .ach-badge-shield {
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}
/* Off-center ring artifact at small sizes · hide completely */
.ach-share-chip .ach-art-ring {
  display: none !important;
}
.ach-share-chip > span:last-child {
  display: block;
  margin-top: 0;
  font-size: 0.68rem;
  line-height: 1.2;
  color: #bbb;
  background: transparent;
  border: none;
  padding: 0;
}
.ach-share-btn {
  margin-top: 8px;
  appearance: none;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: transparent;
  color: #d4af37;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
}
.ach-share-btn:hover {
  background: rgba(212, 175, 55, 0.12);
}
.achievement-status-note {
  display: block;
  font-size: 0.68rem;
  color: #fbbf24;
  margin-top: 4px;
  letter-spacing: 0.3px;
}
.achievement-card--status {
  border-color: rgba(251, 191, 36, 0.25);
}

/* Championship Medals v5 */
.achievement-icon {
  width: 112px;
  height: 128px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ach-medal {
  width: 112px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  --ach-stagger: 0s;
}

.ach-medal-disc {
  width: 100px;
  height: 100px;
  position: relative;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.ach-medal-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.ach-medal.is-earned .ach-medal-disc {
  animation: achMedalIn 0.55s ease both;
  animation-delay: var(--ach-stagger);
}

@keyframes achMedalIn {
  from { opacity: 0; transform: scale(0.86) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.ach-medal.is-unlocked .ach-medal-disc {
  filter: drop-shadow(0 0 12px var(--ach-glow, rgba(212, 175, 55, 0.4)))
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
}

.ach-medal-ribbon {
  font-family: 'Oswald', 'Arial Narrow', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--ach-label, #d4af37);
  opacity: 0.95;
}

.ach-medal.is-locked .ach-medal-ribbon {
  color: #777;
}

.achievement-progress {
  width: 100%;
  margin: 8px 0 4px;
}

.achievement-progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.achievement-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #cd7f32, #d4af37);
  min-width: 2px;
}

.achievement-progress-label {
  display: block;
  margin-top: 6px;
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #c8c8c8;
  font-variant-numeric: tabular-nums;
}
/* Tier cards: title only (no threshold subcopy). Progress uses default label style. */
.achievement-card[data-ach-id$="_tier"] .achievement-desc {
  display: none;
}

.achievement-card {
  padding: 32px 24px 28px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
    linear-gradient(180deg, rgba(16, 16, 18, 0.98) 0%, rgba(10, 10, 12, 0.99) 100%);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.achievement-card.unlocked {
  border-color: rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.08);
}

.achievement-card.unlocked:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 16px 48px rgba(212, 175, 55, 0.12);
}

.achievement-card.locked {
  opacity: 0.55;
}

.achievement-icon {
  min-height: 150px;
  margin-bottom: 16px;
}

/* Hang-tier cards: small gap under index tier pill before threshold title */
.achievement-icon:has(.tier-badge) {
  min-height: 198px;
  margin-bottom: 12px;
}
.achievement-card:has(.tier-badge) .achievement-name {
  margin-top: 2px;
  line-height: 1.25;
}

.achievement-icon .ach-art-frame {
  width: 140px;
  height: 140px;
  border-radius: 24px;
}

.achievement-name {
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.achievement-desc {
  font-size: 0.94rem;
  color: #b0b0b0;
  line-height: 1.55;
}

.achievement-status {
  margin-top: 14px;
  padding: 5px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.8px;
  border-radius: 20px;
}

.achievement-card.unlocked .achievement-status {
  background: linear-gradient(135deg, #D4AF37, #b8962f);
  box-shadow: 0 2px 12px rgba(212, 175, 55, 0.3);
}

/* === Profile / years saved === */
.profile-stat-label {
  font-size: 0.84rem;
  color: #b8b8b8;
}

.profile-stat-value {
  font-size: 1.2rem;
}

/* Years saved hero card · readable, not billboard-scale */
.dashboard-page .years-saved-card {
  min-height: 0;
  padding: 18px 20px !important;
}

.dashboard-page .years-saved-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 1.6px;
  color: #e0d0a8;
}

.dashboard-page .years-saved-value {
  font-size: clamp(1.8rem, 4vw, 2.4rem) !important;
  font-weight: 700;
  line-height: 0.95;
}

.dashboard-page .years-saved-caption {
  font-size: clamp(0.9rem, 1.6vw, 1.1rem);
  color: #f5edd0;
  margin-top: 8px;
}

.dashboard-page .years-saved-sub {
  font-size: 0.88rem !important;
  color: #d0d0d0 !important;
  margin-top: 10px;
  line-height: 1.4;
}

/* === Activity feed === */
.activity-feed-title,
.activity-feed-sub {
  font-size: 0.98rem;
}
.activity-feed-sub { color: #b0b0b0; }
.activity-feed-date { font-size: 0.84rem; color: #a0a0a0; }
.activity-feed-time { font-size: 0.95rem; }

/* === Tables === */
.data-table th {
  font-size: 0.84rem;
  color: #d0d0d0;
}
.data-table td {
  font-size: 0.98rem;
}
.data-table .table-sub {
  font-size: 0.88rem;
  color: #b0b0b0;
}

/* === Tier progress === */
.tier-progress-pct,
.tier-progress-next-row {
  font-size: 0.98rem;
  color: #b8b8b8;
}

/* === Insights === */
.insight-item-label {
  font-size: 0.78rem;
  color: #b0b0b0;
}
.insight-item-value { font-size: 1.25rem; }
.insight-item-sub {
  font-size: 0.86rem;
  color: #a0a0a0;
}

/* === Challenges === */
.challenge-item-title { font-size: 1.02rem; }
.challenge-item-criteria {
  font-size: 0.94rem;
  color: #b0b0b0;
}
.challenge-item-month { font-size: 0.82rem; }
.challenge-progress-label { font-size: 0.88rem; color: #c0c0c0; }
.challenge-ends { font-size: 0.84rem; color: #a0a0a0; }
.challenge-win-chip { font-size: 0.86rem; }

/* === Email prefs / settings === */
.email-pref-label { font-size: 1rem; }
.email-pref-desc {
  font-size: 0.94rem;
  color: #b8b8b8;
  line-height: 1.5;
}

.form-label {
  font-size: 0.82rem;
  color: #c8c8c8;
}

.form-input,
.form-select {
  font-size: 1rem;
  padding: 12px 14px;
}

.modal-subtitle {
  font-size: 0.98rem;
  color: #b8b8b8;
}

/* === Buttons === */
.btn-primary,
.btn-outline,
.btn-sm {
  font-size: 0.92rem;
}

.overview-quick-actions {
  margin-bottom: 28px;
  gap: 12px;
}

/* === Gym benchmark === */
.gym-benchmark-lead {
  font-size: 1rem;
  color: #c0c0c0;
}

/* === Legend === */
.stats-color-legend-list {
  font-size: 0.86rem;
  color: #b8b8b8;
}

/* === Catch-all subtext bump === */
.dashboard-page .streak-card-subtitle,
.dashboard-page .pending-review-banner span,
.dashboard-page .portal-lb-meta,
.dashboard-page .tl-filter-label,
.dashboard-page .tl-pill,
.dashboard-page .status-pill,
.dashboard-page .time-label,
.dashboard-page .calc-detail span:first-child,
.dashboard-page .calc-result-years,
.dashboard-page .challenges-empty,
.dashboard-page .activity-feed-empty,
.dashboard-page .gym-benchmark-name,
.dashboard-page .portal-lb-loc,
.dashboard-page .email-pref-note,
.dashboard-page .share-card-v3-stat-label {
  font-size: 0.94rem;
  color: #b8b8b8;
}

.dashboard-page .welcome-tier .tier-badge {
  transform: scale(1.05);
  transform-origin: top right;
}

.dashboard-page .profile-summary-grid .card-title,
.dashboard-page .years-saved-card {
  padding: 16px 18px;
}

.dashboard-page .tier-progress-section {
  padding: 16px 18px;
}

.dashboard-page .data-table th {
  padding: 10px 12px;
}

.dashboard-page .data-table td {
  padding: 10px 12px;
}

.dashboard-page .sidebar-profile-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.85rem;
}

/* Main content: tight gutters so larger type still fits without H-scroll */
.dashboard-page .dashboard-content {
  padding: 18px 14px 24px;
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}

/* Section achievements header */
#section-achievements .section-header-row {
  margin-bottom: 28px;
  align-items: flex-start;
}

#championMedalsRow.wdhc-medals-row {
  margin-bottom: 24px;
}

/* Brand logo compact by default */
.sidebar-brand-logo {
  height: 42px !important;
  max-width: 160px !important;
}

.sidebar-nav-group {
  margin-top: 4px !important;
  padding-top: 4px !important;
  gap: 1px !important;
}
.sidebar-nav-label {
  padding: 3px 12px 2px !important;
  font-size: 0.66rem !important;
  letter-spacing: 0.1em;
}

.sidebar-qs-item {
  padding: 4px 3px !important;
  border-radius: 8px !important;
}

.welcome-banner {
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
}

/* Short laptop viewports: pack sidebar even tighter so tabs fit */
@media (min-width: 1025px) and (max-height: 900px) {
  html:has(body.dashboard-page) {
    font-size: 15.5px;
  }
  .dashboard-page {
    --sidebar-width: 236px;
  }
  .sidebar-brand {
    padding: 6px 8px 4px !important;
  }
  .sidebar-brand-logo {
    height: 32px !important;
    max-width: 140px !important;
  }
  .sidebar-profile {
    padding: 5px 8px !important;
  }
  .sidebar-link {
    padding: 6px 10px !important;
    font-size: 0.92rem !important;
  }
  .sidebar-nav-group {
    margin-top: 2px !important;
    padding-top: 2px !important;
  }
  .sidebar-nav-label {
    padding: 1px 8px 0 !important;
  }
  .sidebar-footer {
    padding: 5px 6px !important;
    gap: 4px !important;
  }
  .sidebar-qs-item {
    padding: 3px 2px !important;
  }
  .btn-sidebar-primary,
  .btn-sidebar-secondary,
  .btn-sidebar-ghost {
    padding: 5px 8px !important;
    font-size: 0.7rem !important;
  }
}

/* Only slightly roomier on very large monitors */
@media (min-width: 1800px) {
  html:has(body.dashboard-page) {
    font-size: 16px;
  }
  .dashboard-page {
    --sidebar-width: 260px;
  }
  .dashboard-page .dashboard-content {
    padding: 24px 22px 32px;
  }
}

/* === Mobile === */
@media (max-width: 768px) {
  html:has(body.dashboard-page) { font-size: 16px; }
  .dashboard-page { font-size: 1.02rem; }
  .dashboard-content {
    padding: calc(var(--mobile-header-height, 56px) + env(safe-area-inset-top, 0px) + 14px) 14px calc(28px + env(safe-area-inset-bottom, 0px)) !important;
    margin-left: 0 !important;
    max-width: 100vw;
    min-width: 0;
  }
  .welcome-banner { padding: 0 0 16px; }
  .stat-card-value { font-size: 1.7rem; }
  .achievements-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .section-title,
  .overview-title { font-size: 1.45rem; }
  .welcome-chip { font-size: 0.88rem; padding: 8px 12px; }
  .sidebar-link { font-size: 1.05rem; }
}