/* ═══════════════════════════════════════════════════════════════════════════
   PROJECTS — "a bug report you can act on".
   Loaded after landing-desk.css, scoped to body.pms-desk.

   Most project tools let anyone file "it's broken" and leave a developer to
   go and find out what that meant. This one will not take the report without
   steps, expected and actual — they are not optional fields on the model. So
   the page walks one issue through the five parts the tracker records, and
   the required ones are marked as required.
   ═══════════════════════════════════════════════════════════════════════════ */

body.pms-desk {
  --pm: #A78BFA;
}

body.pms-desk .dk-hero { padding: 56px 0 0; }
body.pms-desk .pm-note {
  margin: 18px 0 0;
  font-family: var(--font-family-mono);
  font-size: 10.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #5f6b80;
}

/* ── the issue bench ──────────────────────────────────────────────────────── */
body.pms-desk .pm-bench {
  margin-top: 44px;
  border-radius: 20px;
  border: 1px solid var(--dk-line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  text-align: left;
  position: relative;
}
body.pms-desk .pm-bench::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(700px 320px at 12% -22%, var(--pm), transparent 70%);
  opacity: 0.14;
}
body.pms-desk .pm-bench > * { position: relative; }

/* the issue this whole panel is about, stated once above the tabs */
body.pms-desk .pm-who {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 20px 26px;
  border-bottom: 1px solid var(--dk-line);
  background: rgba(6, 9, 15, 0.34);
}
body.pms-desk .pm-key {
  font-family: var(--font-family-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--pm);
  margin-right: 12px;
}
body.pms-desk .pm-who b {
  font-family: 'Bricolage Grotesque', var(--font-family);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--dk-ink);
}
body.pms-desk .pm-who .meta { font-family: var(--font-family-mono); font-size: 11px; color: var(--dk-dim); }

body.pms-desk .pm-steps {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-bottom: 1px solid var(--dk-line);
  background: rgba(6, 9, 15, 0.4);
}
body.pms-desk .pm-steps button {
  appearance: none;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  color: var(--dk-mute);
  padding: 15px 16px 13px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  position: relative;
  transition: background 0.16s ease, color 0.16s ease;
}
body.pms-desk .pm-steps button:last-child { border-right: 0; }
body.pms-desk .pm-steps button:hover { background: rgba(255, 255, 255, 0.045); color: var(--dk-ink); }
body.pms-desk .pm-steps button .n {
  display: block;
  font-family: var(--font-family-mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: #6f7b91;
  margin-bottom: 4px;
}
body.pms-desk .pm-steps button .l { display: block; font-size: 13.5px; color: inherit; }
body.pms-desk .pm-steps button::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--pm);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
body.pms-desk .pm-steps button[aria-pressed="true"] { background: rgba(255, 255, 255, 0.06); color: var(--dk-ink); }
body.pms-desk .pm-steps button[aria-pressed="true"]::after { transform: scaleX(1); }
body.pms-desk .pm-steps button[aria-pressed="true"] .n { color: var(--pm); }
body.pms-desk .pm-steps button:focus-visible { outline: 2px solid var(--pm); outline-offset: -3px; }

body.pms-desk .pm-panel { padding: 30px 32px 34px; }
body.pms-desk .pm-head {
  font-family: 'Bricolage Grotesque', var(--font-family);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.02em;
  color: var(--dk-ink);
  margin: 0;
}
body.pms-desk .pm-sub {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.62;
  color: var(--dk-mute);
  max-width: 720px;
}

/* ── the fields of an issue ───────────────────────────────────────────────── */
body.pms-desk .pm-fields { margin-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.09); }
body.pms-desk .pm-field {
  display: grid;
  grid-template-columns: minmax(178px, 0.32fr) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
body.pms-desk .pm-field .k {
  font-family: var(--font-family-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dk-dim);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
/* the whole argument of the first tab is in this badge */
body.pms-desk .pm-req {
  font-family: var(--font-family-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 999px;
  padding: 2px 7px;
}
body.pms-desk .pm-field .v { font-size: 14px; line-height: 1.62; color: var(--dk-ink); }
body.pms-desk .pm-field .v ol { margin: 0; padding-left: 18px; }
body.pms-desk .pm-field .v li { margin: 2px 0; }
body.pms-desk .pm-field.dim .v { color: var(--dk-mute); }

/* small labelled pills for triage values */
body.pms-desk .pm-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  font-family: var(--font-family-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  background: color-mix(in srgb, var(--c) 15%, transparent);
  color: var(--c);
}

/* ── the board ────────────────────────────────────────────────────────────── */
body.pms-desk .pm-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}
body.pms-desk .pm-state {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--dk-line);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  color: var(--dk-ink);
}
body.pms-desk .pm-state.alt { border-style: dashed; color: var(--dk-mute); }
body.pms-desk .pm-arrow { color: var(--dk-dim); font-family: var(--font-family-mono); }

body.pms-desk .pm-out {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding: 15px 18px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--pm) 12%, rgba(255, 255, 255, 0.03));
  border: 1px solid color-mix(in srgb, var(--pm) 32%, transparent);
}
body.pms-desk .pm-out .lbl {
  font-family: var(--font-family-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dk-mute);
}
body.pms-desk .pm-out .big {
  font-family: 'Bricolage Grotesque', var(--font-family);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -0.03em;
  color: var(--dk-ink);
  font-variant-numeric: tabular-nums;
}
body.pms-desk .pm-foot {
  margin: 16px 0 0;
  font-size: 13px;
  line-height: 1.62;
  color: var(--dk-dim);
}
body.pms-desk .pm-foot b { color: var(--dk-mute); font-weight: 500; }

/* ── the real screen ──────────────────────────────────────────────────────── */
body.pms-desk .pm-shot {
  margin: 0;
  border-radius: 18px;
  border: 1px solid var(--dk-line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
body.pms-desk .pm-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--dk-line);
}
body.pms-desk .pm-shot figcaption { padding: 15px 20px; font-size: 13px; color: var(--dk-dim); }
body.pms-desk .pm-shot figcaption b { color: var(--dk-ink); font-weight: 600; }

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  body.pms-desk .pm-steps { grid-auto-flow: row; grid-auto-columns: auto; }
  body.pms-desk .pm-steps button {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    padding-left: 18px;
  }
  body.pms-desk .pm-steps button::after {
    top: 0; bottom: 0; left: 0; right: auto;
    width: 3px; height: auto;
    transform: scaleY(0);
    transform-origin: top;
  }
  body.pms-desk .pm-steps button[aria-pressed="true"]::after { transform: scaleY(1); }
  body.pms-desk .pm-field { grid-template-columns: 1fr; gap: 6px; }
  body.pms-desk .pm-panel { padding: 24px 20px 28px; }
  body.pms-desk .pm-who { padding: 18px 20px; }
}
