:root { --green:#4caf50; --green-light:#66bb6a; --bg:#0f1117; --panel:#161b22; --panel-2:#1e2530; --border:rgba(255,255,255,.09); --text:#e8eaf0; --muted:#98a2b3; --danger:#ff6b6b; --radius:14px; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; font-family:Inter,system-ui,sans-serif; color:var(--text); background:radial-gradient(circle at 15% 0,rgba(76,175,80,.13),transparent 28rem),var(--bg); }
a { color:inherit; text-decoration:none; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
.progress-nav { position:sticky; top:0; z-index:20; border-bottom:1px solid var(--border); background:rgba(15,17,23,.9); backdrop-filter:blur(12px); }
.progress-nav-inner { max-width:1180px; min-height:64px; margin:auto; padding:10px 22px; display:flex; align-items:center; gap:18px; }
.brand { color:var(--green-light); font-weight:800; }
.nav-spacer { flex:1; }
.nav-link,.ghost-button { border:1px solid var(--border); background:transparent; color:var(--muted); border-radius:9px; padding:8px 12px; }
.nav-link:hover,.ghost-button:hover { color:var(--text); border-color:rgba(102,187,106,.5); }
.page-shell { width:min(1180px,calc(100% - 32px)); margin:0 auto; padding:46px 0 72px; }
.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:28px; }
.eyebrow { margin:0 0 7px; color:var(--green-light); font-size:.75rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; }
h1,h2,h3,p { margin-top:0; }
h1 { margin-bottom:8px; font-size:clamp(2rem,5vw,3.15rem); line-height:1.08; }
h2 { font-size:1.25rem; }
.muted { color:var(--muted); }
.panel { background:rgba(22,27,34,.92); border:1px solid var(--border); border-radius:var(--radius); padding:22px; box-shadow:0 18px 50px rgba(0,0,0,.18); }
.panel + .panel { margin-top:18px; }
.grid { display:grid; gap:18px; }
.grid.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.stat-card strong { display:block; margin-top:6px; font-size:1.65rem; }
.stat-card span { color:var(--muted); font-size:.83rem; }
.player-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(250px,1fr)); gap:16px; }
.player-card { display:block; padding:20px; border:1px solid var(--border); border-radius:var(--radius); background:var(--panel); transition:.2s; }
.player-card:hover { transform:translateY(-2px); border-color:rgba(102,187,106,.5); }
.stage { display:inline-block; margin-bottom:18px; padding:4px 9px; border-radius:999px; background:rgba(76,175,80,.13); color:var(--green-light); font-size:.75rem; font-weight:700; text-transform:capitalize; }
.button { border:0; border-radius:9px; padding:10px 15px; background:var(--green); color:#071008; font-weight:800; }
.button:hover { background:var(--green-light); }
.button.secondary { color:var(--text); border:1px solid var(--border); background:var(--panel-2); }
.button-row { display:flex; flex-wrap:wrap; gap:10px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.form-field { display:grid; gap:7px; }
.form-field.full { grid-column:1/-1; }
.access-section { margin:4px 0 0; padding:16px; border:1px solid var(--border); border-radius:11px; }
.access-section legend { padding:0 6px; color:var(--text); font-size:.95rem; font-weight:800; }
.access-help { margin:0 0 14px; font-size:.85rem; }
.access-section small { font-size:.75rem; }
label { color:#cbd2dc; font-size:.82rem; font-weight:700; }
input,select,textarea { width:100%; border:1px solid var(--border); border-radius:9px; padding:10px 11px; color:var(--text); background:#11161d; }
textarea { min-height:92px; resize:vertical; }
input:focus,select:focus,textarea:focus { outline:2px solid rgba(76,175,80,.35); border-color:var(--green); }
.status-message { min-height:24px; margin:12px 0; color:var(--muted); }
.status-message.error { color:var(--danger); }
.status-message.success { color:var(--green-light); }
.hidden { display:none !important; }
.modal { position:fixed; inset:0; z-index:50; display:grid; place-items:center; padding:20px; background:rgba(4,7,10,.8); }
.modal-card { width:min(720px,100%); max-height:90vh; overflow:auto; padding:24px; border:1px solid var(--border); border-radius:var(--radius); background:var(--panel); }
.modal-header { display:flex; justify-content:space-between; gap:15px; }
.icon-button { border:0; background:transparent; color:var(--muted); font-size:1.4rem; }
.list { display:grid; gap:12px; }
.list-item { padding:16px; border:1px solid var(--border); border-radius:11px; background:rgba(30,37,48,.6); }
.list-item header { display:flex; justify-content:space-between; gap:12px; }
.list-item p:last-child { margin-bottom:0; }
.tag-list { display:flex; flex-wrap:wrap; gap:7px; }
.tag { padding:4px 8px; border-radius:6px; color:#cbd2dc; background:var(--panel-2); font-size:.78rem; }
.report-published { border-color:rgba(102,187,106,.4); background:linear-gradient(135deg,rgba(76,175,80,.13),rgba(22,27,34,.92) 58%); }
.share-link-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }
.share-link-row input { flex:1 1 320px; min-width:0; }
.share-link-row .button { display:inline-flex; align-items:center; justify-content:center; }
.progress-track { height:9px; margin:11px 0 7px; overflow:hidden; border-radius:99px; background:#0b0e13; }
.progress-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--green),var(--green-light)); }
.login-shell { min-height:calc(100vh - 65px); display:grid; place-items:center; padding:32px 16px; }
.login-card { width:min(430px,100%); }
.google-button { width:100%; margin-top:6px; color:var(--text); background:#253043; }
.google-button:hover { background:#303d52; }
.auth-divider { display:flex; align-items:center; gap:12px; margin:20px 0; color:var(--muted); font-size:.75rem; text-transform:uppercase; }
.auth-divider::before,.auth-divider::after { content:""; height:1px; flex:1; background:var(--border); }
.auth-note { margin:18px 0 0; font-size:.8rem; }
.config-warning { display:none; margin-bottom:20px; padding:14px; color:#ffe59a; border:1px solid rgba(255,214,0,.3); border-radius:9px; background:rgba(255,214,0,.07); }
.config-missing .config-warning { display:block; }
.rubric { overflow-x:auto; }
.rubric table { width:100%; border-collapse:collapse; font-size:.8rem; }
.rubric th,.rubric td { padding:9px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top; }
.chart { display:flex; align-items:flex-end; gap:8px; min-height:140px; padding-top:14px; }
.chart-point { flex:1; min-width:26px; text-align:center; color:var(--muted); font-size:.68rem; }
.chart-bar { min-height:4px; margin-bottom:6px; border-radius:5px 5px 2px 2px; background:var(--green); }
@media (max-width:760px) { .grid.two,.grid.three,.form-grid { grid-template-columns:1fr; } .form-field.full { grid-column:auto; } .page-heading { align-items:flex-start; flex-direction:column; } .progress-nav-inner { flex-wrap:wrap; } }


/* === Rally School 54-session progress matrix === */

.progress-matrix-description {
  margin-bottom: 14px;
}

.progress-matrix-wrap {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 8px;
}

.progress-matrix {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.progress-matrix th,
.progress-matrix td {
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

.progress-matrix thead th {
  border-top: 1px solid rgba(255,255,255,.08);
}

.progress-matrix-metric {
  position: sticky;
  left: 0;
  z-index: 2;
  min-width: 190px;
  max-width: 190px;
  text-align: left !important;
  background: #111923;
}

.progress-matrix thead .progress-matrix-metric {
  z-index: 3;
}

.progress-matrix-session {
  min-width: 82px;
  white-space: nowrap;
}

.progress-matrix-session strong,
.progress-matrix-session span,
.progress-matrix-session small {
  display: block;
}

.progress-matrix-session span,
.progress-matrix-session small {
  margin-top: 3px;
  opacity: .68;
  font-weight: 400;
}

.progress-matrix-cell {
  min-width: 82px;
}

.progress-matrix-cell.empty {
  opacity: .35;
}

.matrix-value {
  min-height: 19px;
  font-weight: 700;
}

.matrix-mini-track {
  width: 100%;
  height: 4px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
}

.matrix-mini-fill {
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  opacity: .72;
}

.progress-scale {
  margin-top: 10px;
  font-size: 12px;
  opacity: .68;
}

/* Make the progress panel full-width if it is left
   inside the previous two-column grid. */
.grid.two:has(#assessmentChart) {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 640px) {
  .progress-matrix-metric {
    min-width: 150px;
    max-width: 150px;
  }

  .progress-matrix-session,
  .progress-matrix-cell {
    min-width: 72px;
  }
}



/* === top stats cards: uniform height === */
#profileStats {
  align-items: stretch;
}

#profileStats > * {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}
