/* Coached. points — leaderboard, portal badge, rewards.
   Palette mirrors coached-brand.php: ink #16130f, muted #6b6458, accent #e25b2a,
   bg #faf9f7, card #fff, line #e6e2da. */

.cp-wrap{max-width:880px;margin:0 auto;padding:24px 20px 64px;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;color:#16130f}

/* ---------- tier chips ---------- */
.cp-tier{display:inline-block;padding:2px 9px;border-radius:10px;font-size:11px;font-weight:700;
  text-transform:uppercase;letter-spacing:.04em;background:#eceae5;color:#6b6458;white-space:nowrap}
.cp-tier-bronze{background:#f4e2d0;color:#7a4a21}
.cp-tier-silver{background:#e4e7e9;color:#49525a}
.cp-tier-gold{background:#faefc9;color:#77590f}
.cp-tier-platinum{background:#e6e3f2;color:#4a3f77}

/* ---------- hero ---------- */
.cp-hero{background:#fff;border:1px solid #e6e2da;border-radius:14px;padding:22px 24px;margin-bottom:20px}
.cp-hero-main{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.cp-hero-pts{font-size:40px;font-weight:700;line-height:1;letter-spacing:-.02em}
.cp-hero-l{color:#6b6458;font-size:14px}
.cp-hero-meta{display:flex;gap:18px;flex-wrap:wrap;margin-top:10px;color:#6b6458;font-size:13px}
.cp-hero-meta strong{color:#16130f}

.cp-meter{margin-top:14px;height:8px;border-radius:99px;background:#eceae5;overflow:hidden}
.cp-meter span{display:block;height:100%;border-radius:99px;background:#e25b2a;transition:width .4s ease}
.cp-meter-lg{height:10px}

/* ---------- tabs ---------- */
.cp-tabs{display:flex;gap:4px;border-bottom:1px solid #e6e2da;margin-bottom:20px;overflow-x:auto}
.cp-tab{padding:10px 16px;color:#6b6458;text-decoration:none;font-weight:600;font-size:14px;
  border-bottom:2px solid transparent;white-space:nowrap}
.cp-tab:hover{color:#16130f}
.cp-tab.is-active{color:#e25b2a;border-bottom-color:#e25b2a}

.cp-period{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}
.cp-pill{padding:5px 13px;border:1px solid #e6e2da;border-radius:99px;background:#fff;color:#6b6458;
  text-decoration:none;font-size:13px;font-weight:600}
.cp-pill.is-active{background:#16130f;border-color:#16130f;color:#fff}

/* ---------- leaderboard ---------- */
.cp-board{list-style:none;margin:0;padding:0;background:#fff;border:1px solid #e6e2da;border-radius:12px;overflow:hidden}
.cp-row{display:flex;align-items:center;gap:12px;padding:11px 16px;border-bottom:1px solid #f0ede7}
.cp-row:last-child{border-bottom:0}
.cp-row.is-me{background:#fdf6f2}
.cp-rank{width:26px;text-align:right;color:#a49c8e;font-weight:700;font-size:13px;font-variant-numeric:tabular-nums}
.cp-row.is-top .cp-rank{color:#e25b2a;font-size:16px}
.cp-av{width:36px;height:36px;border-radius:50%;object-fit:cover;flex:0 0 36px}
.cp-av-blank{display:flex;align-items:center;justify-content:center;background:#eceae5;color:#6b6458;
  font-weight:700;font-size:15px}
.cp-name{flex:1;font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-you{font-style:normal;font-size:11px;color:#e25b2a;font-weight:700;margin-left:6px;
  text-transform:uppercase;letter-spacing:.04em}
.cp-pts{font-weight:700;font-variant-numeric:tabular-nums;min-width:64px;text-align:right}

/* ---------- tables ---------- */
.cp-table{width:100%;border-collapse:collapse;background:#fff;border:1px solid #e6e2da;border-radius:12px;overflow:hidden}
.cp-table th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#6b6458;
  padding:11px 14px;border-bottom:1px solid #e6e2da;background:#faf9f7}
.cp-table td{padding:11px 14px;border-bottom:1px solid #f0ede7;font-size:14px}
.cp-table tr:last-child td{border-bottom:0}
.cp-table .num{text-align:right;font-variant-numeric:tabular-nums}
.cp-table .nowrap{white-space:nowrap;color:#6b6458;font-size:13px}
.cp-table .pos{color:#1a7f37}
.cp-table .neg{color:#b32d2e}

.cp-empty{padding:28px;background:#fff;border:1px solid #e6e2da;border-radius:12px;color:#6b6458;text-align:center}

/* ---------- banners ---------- */
.cp-banner{padding:14px 16px;border-radius:12px;margin-bottom:18px;font-size:14px}
.cp-banner-good{background:#f0f8f2;border:1px solid #cfe6d4;color:#14532d}
.cp-banner-bad{background:#fdf2f2;border:1px solid #f0d3d3;color:#8c2020}
.cp-banner-note{margin:8px 0 0;font-size:13px}

.cp-code{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}
.cp-code code{background:#fff;border:1px dashed #9ac4a6;border-radius:8px;padding:9px 14px;
  font-size:16px;font-weight:700;letter-spacing:.06em;user-select:all}
.cp-copy{background:#1a7f37;color:#fff;border:0;border-radius:8px;padding:9px 14px;font-weight:700;
  font-size:13px;cursor:pointer}
.cp-copy:hover{background:#14532d}

/* ---------- earned-but-unused codes ---------- */
.cp-pending{background:#f0f8f2;border:1px solid #cfe6d4;border-radius:12px;padding:16px 18px;
  margin-bottom:18px}
.cp-pending-h{margin:0 0 12px;font-size:14px;text-transform:uppercase;letter-spacing:.08em;
  color:#14532d;font-weight:700}
.cp-pending-row{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;flex-wrap:wrap}
.cp-pending-row + .cp-pending-row{margin-top:16px;padding-top:16px;border-top:1px solid #cfe6d4}
.cp-pending-row strong{font-size:15px}
.cp-pending-note{margin:6px 0 0;font-size:13px;color:#3f6b4c}
.cp-pending-exp{font-size:12px;color:#3f6b4c;white-space:nowrap;flex:0 0 auto}

/* ---------- rewards ---------- */
.cp-rewards{display:grid;gap:12px}
.cp-reward{display:flex;gap:16px;align-items:center;background:#fff;border:1px solid #e6e2da;
  border-radius:12px;padding:16px}
.cp-reward.is-ready{border-color:#e25b2a;box-shadow:0 1px 3px rgba(226,91,42,.08)}
.cp-reward-img{width:72px;height:72px;object-fit:cover;border-radius:10px;flex:0 0 72px;background:#faf9f7}
.cp-reward-body{flex:1;min-width:0}
.cp-reward-body h3{margin:0 0 4px;font-size:16px}
.cp-reward-body p{margin:0;font-size:13px;color:#6b6458}
.cp-reward-price{margin-top:4px !important;font-weight:600;color:#16130f !important}
.cp-reward-out{margin-top:4px !important;color:#b32d2e !important;font-weight:600}
.cp-reward-side{display:flex;flex-direction:column;align-items:flex-end;gap:8px;flex:0 0 auto}
.cp-cost{font-size:19px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.cp-cost small{font-size:11px;color:#6b6458;font-weight:600;margin-left:3px}
.cp-redeem{background:#e25b2a;color:#fff;border:0;border-radius:9px;padding:9px 18px;
  font-weight:700;font-size:14px;cursor:pointer;white-space:nowrap}
.cp-redeem:hover{background:#d1541d}
.cp-short{font-size:12px;color:#6b6458;font-weight:600;white-space:nowrap}

/* ---------- portal chrome (server-rendered, outside Vue's mount) ---------- */
/* Balance row inside the avatar dropdown, above "My Spaces". FluentCommunity
   renders the anchor as flex with gap:8px, so margin-left:auto is what pushes
   the tier chip + number to the far edge of the menu. */
.fcom_profile_sub_menu li a.cp-menu-points{gap:8px}
.fcom_profile_sub_menu li a.cp-menu-points .fcom_space_lock{margin-left:auto;font-size:inherit;
  opacity:1;display:inline-flex;align-items:center;gap:8px;line-height:1}
.cp-menu-pts{font-size:14px;font-weight:700;font-variant-numeric:tabular-nums;color:#16130f}
html.dark .cp-menu-pts{color:#faf9f7}

.cp-side{background:rgba(0,0,0,.03);border-radius:12px;padding:14px;margin-top:14px;
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif}
html.dark .cp-side{background:rgba(255,255,255,.06)}
.cp-side-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.cp-side-head strong{font-size:19px;font-variant-numeric:tabular-nums}
.cp-side-note{margin:8px 0 0;font-size:12px;color:#6b6458}
.cp-streak{margin:10px 0 0;font-size:12px;font-weight:700;color:#e25b2a}
.cp-side-link{display:inline-block;margin-top:12px;font-size:13px;font-weight:700;
  color:#e25b2a;text-decoration:none}
.cp-side-link:hover{text-decoration:underline}

@media (max-width:640px){
  .cp-wrap{padding:16px 14px 48px}
  .cp-hero{padding:18px}
  .cp-hero-pts{font-size:32px}
  .cp-reward{flex-wrap:wrap}
  .cp-reward-side{flex-direction:row;align-items:center;justify-content:space-between;width:100%}
  .cp-row{padding:10px 12px;gap:9px}
}
/* ---------- live balance ---------------------------------------------------- */
/* The updater polls /coached/v1/me and writes textContent into every
   [data-cp-live] node. Only the flash animations belong here - the numbers
   themselves are already styled by the rules above. */
@keyframes cp-bump-up{0%{transform:translateY(0)}22%{transform:translateY(-3px)}
  55%{transform:translateY(1px)}100%{transform:translateY(0)}}
@keyframes cp-bump-down{0%{transform:translateY(0)}22%{transform:translateY(3px)}
  55%{transform:translateY(-1px)}100%{transform:translateY(0)}}
.cp-bump-up,.cp-bump-down{display:inline-block;animation-duration:.5s;
  animation-timing-function:cubic-bezier(.2,.7,.3,1);animation-fill-mode:both}
.cp-bump-up{animation-name:cp-bump-up}
.cp-bump-down{animation-name:cp-bump-down}
@media (prefers-reduced-motion:reduce){
  .cp-bump-up,.cp-bump-down{animation:none}
}

/* ---------- points notifications ------------------------------------------- */
/* FluentCommunity's notification icon switch has no default branch, so a custom
   `action` leaves .fcom_notification_type empty. Collapse the dead column rather
   than leaving a 20px hole before the row's text. */
.fcom_notification_type:empty{display:none}

.cp-notif-icon{display:inline-flex;vertical-align:-4px;margin-right:7px;color:#c8912b}
.cp-notif-icon svg{display:block}
.cp-notif-meta{display:block;margin-top:2px;font-size:12px;font-weight:400;
  color:#8a8378;line-height:1.4}
.cp-notif-code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:12px;background:rgba(0,0,0,.06);border-radius:4px;padding:1px 5px}
html.dark .cp-notif-code{background:rgba(255,255,255,.12)}
.cp-notif-link{display:inline-block;margin-top:4px;font-size:12px;font-weight:700;
  color:#e25b2a;text-decoration:none;white-space:nowrap}
.cp-notif-link:hover{text-decoration:underline}
/* The row's own anchor already underlines; ours should not double up. */
.notification_item:hover .cp-notif-link{text-decoration:underline}
