/* Jobs: the catalogue of trades, a citizen's work and the labour office.
   Only the shared colour tokens are used, so the site's visual identity
   carries over. A poster register: heavy rules with a red lead, bold grade
   names, numbered assignments like a work order, the top grade on a gold chip.
   Bars are native <progress> (strict CSP). */

/* The page opens with the site's poster head (views/hero.js); the citizen's own job follows it. */
.jobs-head__mine { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }

.jobs-error { font-weight: 650; }

/* How the work is organised. */
.jobs-how { margin: 2rem 0; }
.jobs-steps { padding-left: 1.4rem; max-width: var(--measure); }
.jobs-steps li { margin-bottom: 0.5rem; }
.jobs-commands { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 1rem 0 0; }
.jobs-commands dt { font-weight: 600; }
.jobs-commands dd { margin: 0; color: var(--ink-soft); }

/* The catalogue: one card per trade, under a heavy rule. */
.jobs-list { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 2.5rem; }
.jobs-card { border-top: 6px solid var(--ink); padding-top: 0.75rem; position: relative; }
.jobs-card::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 0;
  width: 4.5rem;
  height: 6px;
  background: var(--civic);
}
.jobs-card__name {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 850;
  font-stretch: 112%;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.jobs-card__summary { font-size: 1.1rem; font-weight: 550; max-width: var(--measure); margin-top: 0.25rem; }
.jobs-card__description { color: var(--ink); }
.jobs-card__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.5rem 2rem; }
.jobs-card__facts h3 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.4rem;
}
.jobs-card__supplies { color: var(--ink-soft); font-size: 0.95rem; }
.jobs-card__mine { font-weight: 700; color: var(--civic); }
.jobs-card__choose { margin-top: 0.75rem; }

.jobs-examples { padding-left: 1.1rem; margin: 0; }
.jobs-examples li { margin-bottom: 0.3rem; }
.jobs-points { white-space: nowrap; font-size: 0.85rem; font-weight: 600; font-stretch: 87.5%; color: var(--ink-soft); }

/* The grade ladder: numbered steps, the last one gold. */
.jobs-grades { list-style: none; counter-reset: grade; padding: 0; margin: 0; }
.jobs-grades li {
  counter-increment: grade;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.3rem 0 0.3rem 2rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.jobs-grades li::before {
  content: counter(grade);
  position: absolute;
  left: 0;
  width: 1.4rem;
  text-align: center;
  font-weight: 800;
  color: var(--paper);
  background: var(--ink);
}
.jobs-grades li:last-child { font-weight: 750; }
.jobs-grades li:last-child::before { background: var(--gold); color: var(--ink); }

.jobs-rations { margin: 3rem 0 1rem; border-top: 3px solid var(--ink); padding-top: 0.25rem; }

/* My work: the grade in large type and the work record. */
.jobs-record { margin: 1.5rem 0 2rem; padding: 1rem 1.25rem 1.25rem; background: var(--paper-deep); border-left: 8px solid var(--civic); }
.jobs-record__job { margin: 0; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.85rem; color: var(--ink-soft); }
.jobs-record__grade { margin: 0.1rem 0 0.5rem; font-size: clamp(1.8rem, 5vw, 2.6rem); font-weight: 850; font-stretch: 112%; line-height: 1.05; }
.jobs-record__top { font-weight: 700; color: var(--civic); }
/* The bar's track must stand out from the panel behind it. */
.jobs-record progress { background: var(--paper); border: 1px solid var(--rule); }
.jobs-record progress::-webkit-progress-bar { background: var(--paper); }
.jobs-pending { font-weight: 600; }

.jobs-count { font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); margin-left: 0.4rem; }

.jobs-assignments, .jobs-offers { list-style: none; padding: 0; margin: 0 0 2rem; border-top: 1px solid var(--rule); }
.jobs-assignment { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.jobs-assignment progress { width: 100%; max-width: 32rem; height: 0.9rem; }
.jobs-assignment__title, .jobs-offer__title { margin: 0 0 0.4rem; font-weight: 650; font-size: 1.05rem; }
.jobs-assignment__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0.35rem 0; color: var(--ink-soft); font-size: 0.92rem; }

/* The round of today's offers: its number, the escalation and how many are done. */
.jobs-round { margin: 0 0 1rem; padding: 0.75rem 1rem; border-left: 6px solid var(--civic); background: var(--paper-deep); }
.jobs-round__figures { margin: 0 0 0.4rem; font-size: 1.1rem; }
.jobs-round progress { width: 100%; max-width: 20rem; height: 0.8rem; background: var(--paper); border: 1px solid var(--rule); }
.jobs-round progress::-webkit-progress-bar { background: var(--paper); }
.jobs-round .field__hint { margin: 0.4rem 0 0; }

/* Today's offers, numbered like a work order. */
.jobs-offer { display: grid; grid-template-columns: 2.6rem 1fr auto; gap: 0.25rem 1rem; align-items: center; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
.jobs-offer__number {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  font-weight: 850;
  font-size: 1.2rem;
  color: var(--paper);
  background: var(--ink);
}
.jobs-offer--plan .jobs-offer__number { background: var(--civic); color: var(--cream); }
.jobs-offer__take { margin: 0; }

.jobs-change { margin: 1rem 0 2rem; }
.jobs-records { padding-left: 1.2rem; }
.jobs-issued { columns: 2 14rem; padding-left: 1.2rem; }

/* The labour office: voiding a completed assignment, with the reason. */
.jobs-void { display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; align-items: center; margin: 0; min-width: 14rem; }
.jobs-void input[type='text'] { width: auto; flex: 1 1 10rem; padding: 0.3rem 0.5rem; }
.jobs-void .field__error { flex-basis: 100%; }
.jobs-void__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 40rem) {
  .jobs-offer { grid-template-columns: 2.6rem 1fr; }
  .jobs-offer__take { grid-column: 2; }
  .jobs-commands { grid-template-columns: 1fr; }
  .jobs-commands dd { margin-bottom: 0.4rem; }
}
