/* "What progress looks like" — live projection widget.
   Used on /about.html (full section) and /index.html (compact homepage).
   Mirrors the math + visual treatment of the client proposal scoreboard. */

.proj-widget {
  max-width: 980px;
  margin: 2.5rem auto 0;
  background: #fff;
  border: 1px solid rgba(54, 89, 92, 0.15);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(20, 30, 30, 0.04);
}
.proj-widget--compact {
  /* Homepage embed: tighter to keep it above the fold on 1024+ */
  margin-top: 1.8rem;
  padding: 1.5rem 1.6rem;
}
.proj-inputs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.8rem;
}
.proj-widget--compact .proj-inputs { margin-bottom: 1.2rem; }

/* ── Tab strip — toggles Chart view ↔ Numbers view on /about ───────────── */
.proj-tabs {
  display: inline-flex;
  background: rgba(54, 89, 92, 0.06);
  border-radius: 999px;
  padding: 4px;
  margin: 0 0 1.5rem;
  border: 1px solid rgba(54, 89, 92, 0.10);
}
.proj-tab {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: transparent; border: none; cursor: pointer;
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: #6b7d80;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.proj-tab:hover { color: #36595C; }
.proj-tab.is-active {
  background: #fff;
  color: #36595C;
  box-shadow: 0 2px 6px rgba(20, 30, 30, 0.08);
}
.proj-tab-icon { font-size: 0.95rem; line-height: 1; }
.proj-tab-panel[hidden] { display: none !important; }
/* NOTE: .proj-peek styles moved to /assets/proj-chart.css so BOFU pages
 * (which only load proj-chart.css) can use the strip without pulling in
 * the rest of the widget styles. */
.proj-input { display: flex; flex-direction: column; gap: 0.4rem; }
.proj-input-label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: #6b7d80;
}
.proj-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid rgba(54, 89, 92, 0.20);
  border-radius: 10px; padding: 0 0.7rem;
  background: #fafbfa;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.proj-input-wrap:focus-within {
  border-color: #F97330;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(249, 115, 48, 0.10);
}
.proj-input-prefix, .proj-input-suffix {
  font-size: 0.95rem; color: #6b7d80; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.proj-input-wrap input {
  flex: 1; border: none; background: transparent; outline: none;
  padding: 0.65rem 0.4rem;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 1.05rem; color: #1f3536;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
  min-width: 0;
}
.proj-input-wrap input::-webkit-outer-spin-button,
.proj-input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}

.proj-chart-wrap {
  background: linear-gradient(135deg, #f7f9f8 0%, #eef2f1 100%);
  border-radius: 14px;
  padding: 1.4rem 1rem 0.6rem;
  margin-bottom: 1.8rem;
}
.proj-widget--compact .proj-chart-wrap {
  padding: 1rem 0.8rem 0.5rem;
  margin-bottom: 1.2rem;
}
/* Hide inputs entirely on static (homepage / BOFU) widgets */
.proj-widget[data-proj-static="true"] .proj-inputs--static,
.proj-widget[data-proj-static="true"] .proj-prefill-strip { display: none; }

/* SVG sizes itself fluidly via viewBox — height: auto preserves the 600×250
 * aspect ratio set in proj-chart.js. The compact override is intentionally
 * relaxed (no fixed height) so the hockey-stick curve doesn't get squished. */
.proj-chart-svg { width: 100%; height: auto; display: block; }
.proj-widget--compact .proj-chart-svg { width: 100%; height: auto; }
.proj-chart-value {
  font-size: 13px; fill: #fff;
  font-family: 'Poppins', sans-serif; font-weight: 800; text-anchor: middle;
}

.proj-cards {
  display: grid; grid-template-columns: 1fr 1.15fr; gap: 1rem;
  margin-bottom: 1.5rem;
}
.proj-widget--compact .proj-cards { margin-bottom: 1.1rem; }
.proj-card {
  border-radius: 14px; padding: 1.3rem 1.4rem;
  border: 1.5px solid transparent;
}
.proj-widget--compact .proj-card { padding: 1.05rem 1.15rem; }
.proj-card.pilot {
  background: linear-gradient(135deg, #fff5ef 0%, #fff8f3 100%);
  border-color: rgba(249, 115, 48, 0.30);
}
.proj-card.ongoing {
  background: linear-gradient(135deg, #36595C 0%, #1f3536 100%);
  color: #fff;
}
.proj-card-eyebrow {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.proj-widget--compact .proj-card-eyebrow { margin-bottom: 0.7rem; }
.proj-card.pilot .proj-card-eyebrow { color: #F97330; }
.proj-card.ongoing .proj-card-eyebrow { color: rgba(255, 255, 255, 0.75); }
.proj-stat {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.45rem 0; border-bottom: 1px solid rgba(54, 89, 92, 0.10);
}
.proj-widget--compact .proj-stat { padding: 0.35rem 0; }
.proj-card.ongoing .proj-stat { border-bottom-color: rgba(255, 255, 255, 0.12); }
.proj-stat:last-child { border-bottom: none; }
.proj-stat-label {
  font-size: 0.86rem; color: inherit; opacity: 0.85;
}
.proj-widget--compact .proj-stat-label { font-size: 0.82rem; }
.proj-stat-num {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: 1.15rem; color: #1f3536;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.proj-card.ongoing .proj-stat-num { color: #fff; }
.proj-stat.headline .proj-stat-num { font-size: 1.55rem; }
.proj-widget--compact .proj-stat.headline .proj-stat-num { font-size: 1.35rem; }
.proj-card.pilot .proj-stat.headline .proj-stat-num { color: #F97330; }
.proj-card.ongoing .proj-stat.headline .proj-stat-num { color: #FFB587; }

.proj-scoreboard {
  background: rgba(54, 89, 92, 0.06);
  border-left: 3px solid #36595C;
  padding: 1.1rem 1.3rem;
  border-radius: 0 10px 10px 0;
  font-size: 0.92rem; color: #1f3536; line-height: 1.6;
  margin-bottom: 1rem;
}
.proj-widget--compact .proj-scoreboard {
  padding: 0.85rem 1.05rem; font-size: 0.85rem; margin-bottom: 0.9rem;
}
.proj-scoreboard strong { color: #36595C; font-weight: 800; }
.proj-disclaimer {
  font-size: 0.74rem; color: #6b7d80;
  text-align: center; margin: 0; font-style: italic; line-height: 1.5;
}

/* CTA strip under the compact homepage widget */
.proj-cta-strip {
  margin-top: 1.2rem;
  display: flex; justify-content: center;
}
.proj-cta-strip .btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.6rem; border-radius: 999px;
  background: #F97330; color: #fff; text-decoration: none;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 0.92rem; letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(249, 115, 48, 0.30);
  transition: transform 0.15s, box-shadow 0.15s;
}
.proj-cta-strip .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(249, 115, 48, 0.40);
}

/* "Pre-fill from my last 90 days" link — sits above the input grid */
.proj-prefill-strip {
  display: flex; justify-content: flex-end; align-items: center;
  margin-bottom: 0.75rem; gap: 0.5rem;
}
.proj-prefill-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(249, 115, 48, 0.08);
  border: 1px solid rgba(249, 115, 48, 0.25);
  color: #F97330; text-decoration: none;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.01em;
  padding: 0.45rem 0.85rem; border-radius: 999px;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  cursor: pointer;
}
.proj-prefill-link:hover {
  background: rgba(249, 115, 48, 0.15);
  border-color: rgba(249, 115, 48, 0.45);
  transform: translateY(-1px);
}
.proj-prefill-link-icon { font-size: 0.9rem; }

/* "⚡ Adjust for call quality" toggle — sits under the input grid */
.proj-quality-row {
  display: flex; align-items: center; justify-content: flex-start;
  margin: -0.6rem 0 1.6rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(135deg, rgba(249, 115, 48, 0.06) 0%, rgba(54, 89, 92, 0.04) 100%);
  border: 1px solid rgba(249, 115, 48, 0.18);
  border-radius: 12px;
}
.proj-widget--compact .proj-quality-row {
  margin: -0.4rem 0 1.1rem;
  padding: 0.55rem 0.85rem;
}
.proj-quality-switch {
  display: flex; align-items: center; gap: 0.85rem;
  cursor: pointer; user-select: none; width: 100%;
}
.proj-quality-switch input { position: absolute; opacity: 0; pointer-events: none; }
.proj-quality-track {
  position: relative; flex-shrink: 0;
  width: 42px; height: 24px;
  background: rgba(54, 89, 92, 0.22);
  border-radius: 999px;
  transition: background 0.22s ease;
}
.proj-quality-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(20, 30, 30, 0.25);
  transition: transform 0.22s ease;
}
.proj-quality-switch input:checked + .proj-quality-track { background: #F97330; }
.proj-quality-switch input:checked + .proj-quality-track .proj-quality-thumb {
  transform: translateX(18px);
}
.proj-quality-switch input:focus-visible + .proj-quality-track {
  box-shadow: 0 0 0 3px rgba(249, 115, 48, 0.30);
}
.proj-quality-label {
  display: flex; flex-direction: column; gap: 0.15rem;
  font-family: 'Poppins', sans-serif; line-height: 1.4;
}
.proj-quality-label strong {
  font-size: 0.86rem; font-weight: 700; color: #1f3536;
  letter-spacing: -0.005em;
}
.proj-quality-explainer {
  font-size: 0.74rem; color: #6b7d80; font-weight: 500;
  line-height: 1.45;
}
.proj-widget--compact .proj-quality-label strong { font-size: 0.82rem; }
.proj-widget--compact .proj-quality-explainer { font-size: 0.72rem; }

/* MODAL — opens when the prefill link is clicked */
.proj-modal-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(20, 30, 30, 0.55);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  padding: 1.2rem;
  opacity: 0; transition: opacity 0.18s ease;
}
.proj-modal-backdrop.is-open {
  display: flex; opacity: 1;
}
.proj-modal {
  background: #fff;
  border-radius: 18px;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 2.4rem);
  overflow-y: auto;
  padding: 1.8rem;
  box-shadow: 0 24px 60px rgba(20, 30, 30, 0.30);
  transform: translateY(8px); opacity: 0;
  transition: transform 0.22s ease, opacity 0.18s ease;
}
.proj-modal-backdrop.is-open .proj-modal {
  transform: translateY(0); opacity: 1;
}
.proj-modal-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; margin-bottom: 1.1rem;
}
.proj-modal-eyebrow {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: #F97330; margin-bottom: 0.3rem;
}
.proj-modal-title {
  font-family: 'Poppins', sans-serif; font-weight: 800;
  font-size: 1.25rem; color: #1f3536;
  letter-spacing: -0.01em; line-height: 1.25; margin: 0;
}
.proj-modal-sub {
  font-size: 0.86rem; color: #6b7d80;
  margin: 0.5rem 0 0; line-height: 1.55;
}
.proj-modal-close {
  border: none; background: rgba(54, 89, 92, 0.08);
  width: 32px; height: 32px; border-radius: 50%;
  color: #36595C; font-size: 1.15rem; cursor: pointer;
  flex-shrink: 0; transition: background 0.15s;
}
.proj-modal-close:hover { background: rgba(54, 89, 92, 0.16); }

.proj-modal-section {
  margin-top: 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(54, 89, 92, 0.13);
  border-radius: 12px;
  background: #fafbfa;
}
.proj-modal-section-title {
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 0.92rem; color: #1f3536; margin: 0 0 0.7rem;
}
.proj-modal-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem;
  margin-bottom: 0.7rem;
}
.proj-modal-row:last-child { margin-bottom: 0; }
.proj-modal-derived {
  margin-top: 0.6rem; padding: 0.55rem 0.8rem;
  background: rgba(54, 89, 92, 0.06);
  border-left: 3px solid #36595C;
  border-radius: 0 8px 8px 0;
  font-size: 0.82rem; color: #1f3536;
}
.proj-modal-derived strong {
  color: #36595C; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.proj-modal-derived-muted { color: #6b7d80; font-style: italic; }

.proj-modal-foot {
  margin-top: 1.4rem;
  display: flex; gap: 0.7rem; justify-content: flex-end;
  align-items: center; flex-wrap: wrap;
}
.proj-modal-note {
  font-size: 0.72rem; color: #6b7d80;
  margin-right: auto; line-height: 1.4;
}
.proj-modal-btn {
  border: none; cursor: pointer;
  padding: 0.7rem 1.2rem; border-radius: 999px;
  font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 0.85rem; letter-spacing: 0.01em;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.proj-modal-btn.secondary {
  background: transparent; color: #36595C;
}
.proj-modal-btn.secondary:hover { background: rgba(54, 89, 92, 0.08); }
.proj-modal-btn.primary {
  background: #F97330; color: #fff;
  box-shadow: 0 4px 14px rgba(249, 115, 48, 0.30);
}
.proj-modal-btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(249, 115, 48, 0.40);
}
.proj-modal-btn.primary:disabled {
  background: #d1d5db; cursor: not-allowed; box-shadow: none; transform: none;
}

@media (max-width: 720px) {
  .proj-widget { padding: 1.3rem; }
  .proj-widget--compact { padding: 1.1rem 1rem; }
  .proj-inputs { grid-template-columns: repeat(2, 1fr); }
  .proj-cards { grid-template-columns: 1fr; }
  .proj-chart-svg { height: 180px; }
  .proj-widget--compact .proj-chart-svg { height: 150px; }
}
