/* Gigxie — projects: intake wizard, workspace, my-projects list.
   Loads after tokens.css, components.css and app.css, so .btn, .field,
   .order-state, .dash-card, .status-pill, .sk and .tabs are all available. */

.proj-page { padding: 40px 0 96px; }
.proj-page .breadcrumbs { margin-bottom: 20px; }

/* ---------- Shared: readiness bar ---------- */
.ready-row { display: flex; align-items: center; gap: 12px; }
.ready-bar {
  flex: 1;
  height: 8px;
  min-width: 120px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}
.ready-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--brand);
  transition: width var(--ease);
}
.ready-pct { font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.ready-missing { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- Shared: priority + status badges ---------- */
.prio {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--bg-soft);
  color: var(--muted);
}
.prio[data-prio="required"] { background: var(--danger-wash); color: var(--danger-ink); }
.prio[data-prio="important"] { background: #FFF4E0; color: #8A5200; }
.prio[data-prio="optional"] { background: var(--bg-soft); color: var(--muted); }

/* Project lifecycle pills — same component as order pills, new statuses. */
.status-pill[data-status="draft"],
.status-pill[data-status="intake"] { background: #EEF1F6; color: #41506B; }
.status-pill[data-status="matching"] { background: var(--brand-tint); color: var(--brand-dark); }
.status-pill[data-status="scoping"] { background: #FFF4E0; color: #8A5200; }
.status-pill[data-status="active"] { background: #E0F2FE; color: #075985; }
.status-pill[data-status="review"] { background: var(--brand-wash); color: var(--brand-dark); }
.status-pill[data-status="answered"],
.status-pill[data-status="agreed"],
.status-pill[data-status="measured"] { background: #E6F7EF; color: var(--success-ink); }
.status-pill[data-status="open"],
.status-pill[data-status="proposed"],
.status-pill[data-status="defined"] { background: #EEF1F6; color: #41506B; }
.status-pill[data-status="auto_resolved"] { background: var(--brand-tint); color: var(--brand-dark); }
.status-pill[data-status="dismissed"],
.status-pill[data-status="deferred"] { background: var(--bg-soft); color: var(--muted); }
/* Scope-change outcomes and participant standing. A change that was accepted or
   an account that was hired reads as settled; rejected/declined reads as a
   refusal; withdrawn/removed is simply no longer in play. */
.status-pill[data-status="accepted"],
.status-pill[data-status="hired"] { background: #E6F7EF; color: var(--success-ink); }
.status-pill[data-status="rejected"],
.status-pill[data-status="declined"] { background: var(--danger-wash); color: var(--danger-ink); }
.status-pill[data-status="withdrawn"],
.status-pill[data-status="removed"] { background: var(--bg-soft); color: var(--muted); }
.status-pill[data-status="invited"],
.status-pill[data-status="applied"],
.status-pill[data-status="shortlisted"] { background: var(--brand-tint); color: var(--brand-dark); }

/* ---------- Intake wizard ---------- */
.wiz { max-width: 780px; margin: 0 auto; }
.wiz-head { margin-bottom: 24px; }
.wiz-head h1 { font-size: 36px; margin-bottom: 8px; }
.wiz-head p { max-width: 60ch; }

.wiz-progress {
  display: flex;
  gap: 8px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
  counter-reset: wizstep;
}
.wiz-progress li {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding-top: 10px;
  border-top: 3px solid var(--line);
}
.wiz-progress li.is-current { color: var(--brand-dark); border-top-color: var(--brand); }
.wiz-progress li.is-done { color: var(--success-ink); border-top-color: var(--success); }

.wiz-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
}
.wiz-panel h2 { font-size: 24px; margin-bottom: 6px; }
.wiz-lede { color: var(--body); margin-bottom: 20px; max-width: 62ch; }
.wiz-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; align-items: center; }
.wiz-optional-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.s2-cat { margin-top: 20px; max-width: 420px; }
.type-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  background: var(--bg);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.type-card:hover { border-color: var(--brand); }
.type-card[aria-pressed="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-wash);
  background: var(--brand-tint);
}
.type-card strong { display: block; color: var(--ink); font-family: var(--font-head); }
.type-card span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Requirement / question items ---------- */
.req-list { display: grid; gap: 12px; margin: 0; padding: 0; }
.req-item {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
  background: var(--bg);
}
.req-item.is-answered { background: var(--bg-soft); }
.req-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.req-label { font-weight: 600; color: var(--ink); }
.req-value { font-size: 14px; color: var(--body); overflow-wrap: anywhere; }
.req-answer { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.req-answer input, .req-answer textarea {
  flex: 1;
  min-width: 200px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 8px 12px;
  font-size: 14px;
}
.req-group-h {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 20px 0 10px;
}
.req-group-h:first-child { margin-top: 0; }

/* ---------- Workspace ---------- */
.proj-head { margin-bottom: 20px; }
.proj-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.proj-title-row h1 { font-size: 32px; overflow-wrap: anywhere; }
.proj-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-top: 8px; }
.proj-meta strong { color: var(--ink); font-weight: 600; }
.proj-ready { margin-top: 14px; max-width: 560px; }
.proj-tabs { margin: 24px 0 0; overflow-x: auto; }
.proj-panel { padding: 24px 0 0; }
.panel-note { font-size: 14px; color: var(--muted); margin-bottom: 16px; max-width: 70ch; }

.panel-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 20px;
  margin-bottom: 16px;
}
.panel-card h3 { font-size: 18px; margin-bottom: 6px; }
.panel-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }

.brief-dl { display: grid; gap: 10px; margin: 0; }
.brief-dl > div { display: grid; grid-template-columns: 180px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.brief-dl > div:last-child { border-bottom: 0; }
.brief-dl dt { font-size: 13px; font-weight: 600; color: var(--muted); }
.brief-dl dd { margin: 0; font-size: 14px; color: var(--ink); overflow-wrap: anywhere; }

.transition-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }

/* Questions */
.q-item { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; margin-bottom: 12px; background: var(--bg); }
.q-item.is-auto { background: var(--brand-tint); border-color: var(--brand-wash); }
.q-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.q-body { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.q-askers { font-size: 12px; font-weight: 600; color: var(--brand-dark); background: var(--brand-wash); border-radius: var(--r-pill); padding: 2px 10px; }
.q-answer { font-size: 14px; color: var(--body); margin-top: 6px; overflow-wrap: anywhere; }
.q-auto-note { font-size: 13px; color: var(--brand-dark); margin-top: 6px; font-weight: 600; }
.q-reply { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.q-reply textarea { flex: 1; min-width: 220px; border: 1px solid var(--line); border-radius: var(--r-input); padding: 8px 12px; font-size: 14px; }

/* Shortlist */
.cand { border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; margin-bottom: 12px; background: var(--bg); }
.cand-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cand-name { font-weight: 700; color: var(--ink); font-family: var(--font-head); }
.cand-score { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--brand-dark); background: var(--brand-tint); border-radius: var(--r-pill); padding: 3px 12px; }
.cand-new { font-size: 12px; font-weight: 700; color: var(--success-ink); background: #E6F7EF; border-radius: var(--r-pill); padding: 2px 10px; }
.cand-reasons { margin: 10px 0 0; padding: 0 0 0 18px; font-size: 14px; color: var(--body); }
.cand-reasons li { margin-bottom: 2px; overflow-wrap: anywhere; }
.cand-foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.cand-fine { font-size: 13px; color: var(--muted); margin-top: 8px; max-width: 70ch; }

/* People panel: invite, link an existing order, message about the project. */
.ppl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.link-order { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.link-order select {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  padding: 8px 12px;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
}

.est-box {
  background: var(--accent-wash);
  border: 1px solid var(--accent-dark);
  border-radius: var(--r-card);
  padding: 18px;
}
.est-box h3 { font-size: 15px; }
.est-range { font-size: 26px; font-weight: 800; font-family: var(--font-head); color: var(--ink); margin: 6px 0; }
.est-note { font-size: 13px; color: var(--muted); }

/* Scope */
.scope-item { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 10px; background: var(--bg); }
.scope-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scope-title { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.scope-detail { font-size: 14px; color: var(--body); margin-top: 4px; overflow-wrap: anywhere; }
.scope-due { font-size: 13px; color: var(--muted); margin-left: auto; white-space: nowrap; }
/* Scope changes — deliberately NOT styled like an agreed scope item: a change is
   a request about the agreement, not part of it until both sides say so. */
.scope-change {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-left-color: var(--line);
  border-radius: var(--r-card);
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--bg);
}
.scope-change[data-status="proposed"] { border-left-color: #E5B454; background: var(--bg-soft); }
.scope-change[data-status="accepted"] { border-left-color: var(--success); }
.scope-change[data-status="rejected"] { border-left-color: var(--danger); }
.chg-note { font-size: 13px; color: var(--muted); margin-top: 8px; max-width: 70ch; }
.chg-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sc-agree-card { margin-top: 16px; }

.verdict { border-radius: var(--r-card); padding: 16px; margin-top: 14px; border: 1px solid var(--line); background: var(--bg-soft); }
.verdict[data-verdict="in_scope"] { background: #E6F7EF; border-color: var(--success); }
.verdict[data-verdict="maybe_out"] { background: #FFF4E0; border-color: #E5B454; }
.verdict-h { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.verdict-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Risk */
.risk-item { border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--r-card); padding: 14px 16px; margin-bottom: 10px; background: var(--bg); display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.risk-item[data-severity="high"] { border-left-color: var(--danger); }
.risk-item[data-severity="elevated"] { border-left-color: #E5B454; }
.risk-item[data-severity="info"] { border-left-color: var(--brand); }
.risk-kind { font-weight: 600; color: var(--ink); }
.risk-detail { font-size: 14px; color: var(--body); overflow-wrap: anywhere; }
.risk-sev { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: var(--r-pill); background: var(--bg-soft); color: var(--muted); }
.risk-item[data-severity="high"] .risk-sev { background: var(--danger-wash); color: var(--danger-ink); }
.risk-item[data-severity="elevated"] .risk-sev { background: #FFF4E0; color: #8A5200; }
.pm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 16px; }
.pm-cell { border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; background: var(--bg); }
.pm-cell h4 { font-size: 14px; margin-bottom: 6px; }
.pm-cell ul { margin: 0; padding-left: 18px; font-size: 14px; color: var(--body); }
.pm-cell li { overflow-wrap: anywhere; }
.pm-empty { font-size: 14px; color: var(--muted); }

/* Outcomes */
.oc-item { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; margin-bottom: 12px; background: var(--bg); }
.oc-statement { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.oc-meta { font-size: 13px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.oc-result { font-size: 14px; color: var(--body); margin-top: 6px; overflow-wrap: anywhere; }
.oc-measure { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.oc-measure input { flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: var(--r-input); padding: 8px 12px; font-size: 14px; }

/* ---------- My projects list ---------- */
.mp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; }
.mp-card {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--bg);
  box-shadow: var(--shadow-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow var(--ease), transform var(--ease);
}
.mp-card:hover { box-shadow: var(--shadow-hover); }
.mp-card h3 { font-size: 17px; }
.mp-card h3 a { color: var(--ink); }
.mp-card h3 a:hover { color: var(--brand-dark); }
.mp-obj { font-size: 14px; color: var(--body); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-foot { display: flex; align-items: center; gap: 10px; margin-top: auto; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.opp-brief { background: var(--bg-soft); border-radius: var(--r-input); padding: 12px; font-size: 13px; color: var(--body); }
.opp-brief dt { font-weight: 600; color: var(--muted); }
.opp-brief dd { margin: 0 0 6px; overflow-wrap: anywhere; }
.mp-section-h { margin: 40px 0 16px; }
.mp-section-h h2 { font-size: 24px; }
.mp-section-h p { font-size: 14px; color: var(--muted); }

/* Inline feedback used across all project pages */
.act-note { font-size: 13px; color: var(--muted); margin-top: 8px; }
.act-note.is-ok { color: var(--success-ink); }
.act-note.is-bad { color: var(--danger-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .mp-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mp-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .wiz-optional-row { grid-template-columns: 1fr; }
  .pm-grid { grid-template-columns: 1fr; }
  .brief-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .wiz-panel { padding: 20px; }
}

/* ---------- Buyer copilot panel (my-projects.html) ---------- */
.cop-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 16px; }
.cop-stat { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.cop-stat.is-attention { border-color: var(--brand-dark); }
.cop-stat-n { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.cop-stat.is-attention .cop-stat-n { color: var(--brand-dark); }
.cop-stat-l { font-size: 13px; color: var(--muted); }
.cop-ask { display: flex; gap: 10px; margin: 0 0 10px; }
.cop-ask input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 10px 16px; font: inherit; background: var(--bg); color: var(--ink); }
.cop-ask input:focus-visible { outline: 2px solid var(--brand-dark); outline-offset: 1px; }
.cop-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cop-chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: var(--r-pill); padding: 6px 14px; font-size: 13px; cursor: pointer; transition: border-color .15s var(--ease); }
.cop-chip:hover { border-color: var(--brand-dark); }
.cop-answer { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; margin: 0 0 8px; }
.cop-answer > p:first-child { margin: 0 0 10px; white-space: pre-line; }
.cop-grounded { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 10px; font-size: 13px; }
.cop-grounded dt { color: var(--muted); }
.cop-grounded dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
#cop-section .act-note { margin: 0; }
@media (max-width: 560px) { .cop-ask { flex-direction: column; } }
