/* ─────────────────────────────────────────────────────────────────────────────
   progress.css — v64 door-to-door progress tracking.
   The Progress page (#progress), the in-Scout weekly strip, and the map
   coverage control. White-theme first, token-driven, Geist type.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── the Progress page (mirrors #directory's full-page overlay pattern) ────── */
#progress {
  position: absolute; inset: 0; z-index: 800;
  background: var(--ink); display: none; flex-direction: column;
}
.pg-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 10px; border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.pg-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--text); }
.pg-sub { font-family: var(--font-mono); font-weight: 400; font-size: 11px; color: var(--text-dim); margin-left: 8px; letter-spacing: .4px; text-transform: uppercase; }
.pg-head .topbtn { margin-left: auto; }

.pg-scroll { flex: 1; overflow-y: auto; padding: 16px 18px 28px; }
.pg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 1060px; margin: 0 auto; }
.pg-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
}
.pg-card.pg-wide { grid-column: 1 / -1; }
.pg-card h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pg-dim { color: var(--text-dim); font-size: 12px; }
p.pg-dim { margin: 0 0 10px; line-height: 1.5; }
.pg-warn {
  margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--text);
  background: var(--gold-dim); border: 1px solid var(--gold-deep); border-radius: 8px; padding: 8px 10px;
}
.pg-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* my-week funnel */
.pg-funnel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pg-stat { display: flex; flex-direction: column; min-width: 84px; }
.pg-stat b { font-family: var(--font-mono); font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.1; }
.pg-stat span { font-size: 11px; color: var(--text-dim); }
.pg-arrow { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* buttons / segments (page-local, matches the app's control language) */
.pg-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 12px; font-family: var(--font-body); font-size: 12.5px;
  font-weight: 500; cursor: pointer;
}
.pg-btn:hover { border-color: var(--gold-deep); }
.pg-btn.primary { background: var(--gold); border-color: var(--gold-deep); color: #1c2433; font-weight: 600; }
.pg-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pg-seg button {
  background: var(--panel); border: 0; color: var(--text-dim); padding: 6px 11px;
  font-family: var(--font-body); font-size: 12px; cursor: pointer;
}
.pg-seg button + button { border-left: 1px solid var(--line); }
.pg-seg button.on { background: var(--gold-dim); color: var(--text); font-weight: 600; }

/* tables */
.pg-tablewrap { overflow-x: auto; }
.pg-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.pg-table th {
  text-align: left; font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: .6px; text-transform: uppercase; color: var(--text-dim);
  padding: 6px 10px; border-bottom: 1px solid var(--line);
}
.pg-table td { padding: 7px 10px; border-bottom: 1px solid var(--line); color: var(--text); }
.pg-table th.num, .pg-table td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }
.pg-table tr.me td { background: var(--gold-dim); }
.pg-pct { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-left: 6px; }

/* progress bars */
.pg-bar {
  display: inline-block; vertical-align: middle; width: 120px; max-width: 40vw; height: 8px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden;
}
.pg-bar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }

/* goals */
.pg-goal { padding: 10px 0; border-bottom: 1px solid var(--line); }
.pg-goal:last-child { border-bottom: 0; }
.pg-goal-top { font-size: 13px; color: var(--text); margin-bottom: 6px; }
.pg-goal-top b { font-weight: 600; }
.pg-goal-meta { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); margin-left: 8px; }
.pg-goal .pg-bar { width: 100%; max-width: 420px; height: 10px; }
.pg-goal-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--text-dim); }
.pg-joined { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); border: 1px solid var(--line); border-radius: 99px; padding: 2px 8px; }
.pg-newgoal { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pg-newgoal select, .pg-newgoal input {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 7px 10px; font-size: 12.5px; font-family: var(--font-body);
}
.pg-invites { margin-top: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.pg-inv { display: inline-flex; align-items: center; gap: 5px; color: var(--text); cursor: pointer; }
.pg-inv input { width: 15px; height: 15px; }   /* outline style comes from the shared rule in styles.css */

/* ── in-Scout weekly strip (inside Scout's chrome — NOT a floating rail) ───── */
.scout-strip {
  padding: 6px 16px 7px; font-size: 12px; color: var(--sc-text-dim, var(--text-dim));
  border-bottom: 1px solid var(--sc-line, var(--line));
  font-variant-numeric: tabular-nums;
}
.scout-strip b { color: var(--sc-text, var(--text)); font-weight: 700; }
.strip-wk { font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; opacity: .7; margin-left: 4px; }

/* ── map coverage control (bottom-right stack) ─────────────────────────────── */
/* the Me/Team switch is a horizontal pill that slides out LEFT of the door button —
   no more cramped stacked text under the icon (JW feedback, 2026-07-08) */
.cov-ctl { position: relative; overflow: visible !important; }
.cov-ctl .cov-toggle { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; color: var(--text); }
.cov-ctl .cov-toggle.on { background: var(--gold); color: #1c2433; }
.cov-ctl .cov-seg {
  position: absolute; right: 38px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: var(--shadow-sm); padding: 3px; white-space: nowrap;
}
.cov-ctl .cov-seg[hidden] { display: none; }
.cov-seg-lbl {
  font-family: var(--font-mono); font-size: 9px; font-weight: 600; letter-spacing: .8px;
  text-transform: uppercase; color: var(--text-dim); padding: 0 8px 0 9px;
}
.cov-ctl .cov-seg button {
  border: 0; background: transparent; color: var(--text-dim);
  font-family: var(--font-body); font-size: 11.5px; font-weight: 500;
  padding: 4px 12px; border-radius: 999px; cursor: pointer; line-height: 1.2;
}
.cov-ctl .cov-seg button:hover { color: var(--text); }
.cov-ctl .cov-seg button.on { background: var(--gold); color: #1c2433; font-weight: 600; }

@media (max-width: 900px) {
  .pg-grid { grid-template-columns: 1fr; }
}
