/* The employer surface (/e), on top of base.css. Same family as /p, different
   register: this reader is a business in a commercial relationship, not a person
   in a vulnerable one. So the column is wider, the rows are denser, the chrome
   carries tabs, and the page says where the account stands rather than where the
   reader is on a path.

   Still mobile first: a manager reads this between two other things. */

main { width: min(100% - 2 * var(--edge), 68rem); }

/* A page that is only a message keeps a reading measure. */
main > .card.center { max-width: 34rem; margin-left: auto; margin-right: auto; }

/* ---- the standing block ----

   Four conditions decide whether this employer may ask anybody for their contact
   details. When all four hold it is one quiet line that can be opened; when one
   does not it stands open, because that is what the reader has to deal with. */

.standing {
  background: var(--surface);
  border: 1px solid var(--haze);
  border-radius: var(--radius);
  margin: 0 0 1.25rem;
}

.standing-gated { border: 1.5px solid var(--honey); }

.standing > summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3.25rem;
  padding: 0.5rem 1.1rem;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.standing > summary::-webkit-details-marker { display: none; }

.standing > summary::before {
  content: '';
  width: 1.1rem;
  height: 1.1rem;
  flex: none;
  border-radius: 50%;
  background: var(--bead-ink);
  box-shadow: var(--bead-shade);
}

.standing-gated > summary::before { background: var(--bead-amber); }

.standing > summary::after {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  margin-left: auto;
  flex: none;
  border-bottom: 2px solid var(--quiet);
  border-right: 2px solid var(--quiet);
  transform: rotate(45deg) translate(-2px, -2px);
}

.standing[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }

.standing > summary h2 { margin: 0; font: inherit; }

.standing-body { padding: 0 1.1rem 1.1rem; }

/* The conditions, strung on the same thread as everything else: a dark bead is
   satisfied, an amber one is not yet, and the word beside it says so in full. */
.ledger {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.1rem;
  margin: 0.25rem 0 0;
}

.ledger::before {
  content: '';
  position: absolute;
  left: calc(0.65rem - var(--cord-w) / 2);
  top: 0.75rem;
  bottom: 0.75rem;
  width: var(--cord-w);
  background: var(--twine);
  filter: var(--cord-shade);
}

/* The row wrapper exists to carry the state class; display:contents hands its dt
   and dd straight to the grid. */
.ledger > div { display: contents; }

.ledger dt {
  position: relative;
  padding-left: 2rem;
  color: var(--quiet);
}

.ledger dt::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--bead-ink);
  box-shadow: var(--bead-shade);
}

.ledger dd { margin: 0 0 0.45rem; padding-left: 2rem; font-weight: 600; }

.ledger .no dt::before { background: var(--bead-amber); }
.ledger .no dd { color: var(--clay); }

.standing .verdict {
  margin: 1rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--haze);
  font-weight: 600;
}

/* ---- two states, two vocabularies ----

   Open or closed is the employer's own switch; draft, awaiting review, published
   or rejected is JobsHub's verdict on the listing. Drawn as one shape they read as
   one taxonomy, so the switch is a bead and a word and the verdict is a chip. */

.state {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--quiet);
  white-space: nowrap;
}

.state::before {
  content: '';
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #FFFFFF 0 12%, #DDE4EE 48%, #AEBBCD 96%);
  box-shadow: 0 1px 2px rgba(12, 28, 52, 0.3);
  flex: none;
}

.state-open { color: var(--ink); }
.state-open::before { background: var(--bead-ink); }

.chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
  background: var(--shore);
  border-radius: 6px;
  white-space: nowrap;
}

/* A draft carries no verdict, nobody has been asked to look at it yet, so it is
   the one chip drawn as an outline rather than a filled state. */
.chip-draft { color: var(--quiet); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.chip-pending { background: var(--honey-pale); }
.chip-published { color: var(--olive); background: var(--olive-pale); }
.chip-rejected { color: var(--clay); background: var(--clay-pale); }

.meta { margin: 0; font-size: 0.93rem; color: var(--quiet); }

/* ---- the listing list ---- */

.lrow {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
}

.lrow > div { min-width: 0; }
.lrow .states { display: flex; flex-wrap: wrap; gap: 0.4rem 0.6rem; margin: 0; }

.lrow-go { flex: 1 0 100%; }

/* ---- the candidate market ---- */

/* The heading reads on as one sentence, what the page is and then which listing. */
.h1-for {
  display: block;
  margin-top: 0.3rem;
  font: 600 1.15rem/1.35 var(--title);
  letter-spacing: -0.005em;
  color: var(--quiet);
}

/* The claim about what the ladder covers is an element, not a footnote: an employer
   reading pseudonymous people should be able to see that the grain was decided on
   purpose. */
.claim-panel {
  background: var(--sea-pale);
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
  margin: 0 0 1.25rem;
}

.claim-panel h2 { margin: 0 0 0.4rem; font-size: 1.05rem; }
.claim-panel p { margin: 0; font-size: 0.96rem; }
.claim-panel p + p { margin-top: 0.5rem; }

.grid + .claim-panel { margin: 1.35rem 0 0; }

/* A drawn cord above this sentence would read as a count of people, which is the
   one thing the sentence withholds. */
.empty-floor::before { display: none; }
.empty-floor { text-align: left; }
.empty-floor p:last-child { margin-bottom: 0; }

/* As many columns as fit and never fewer than a card can bear. */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr));
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* The column plus the auto top margin below is what lines every card's control up
   on the bottom edge of its row, whatever height the facts above it took. */
.cand { display: flex; flex-direction: column; }

/* Two even columns, so a long Greek label cannot starve its value of the width a
   long Greek value needs. */
.cand dl { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.intro dl { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }

/* A yes, on the card of the person who said it: the amber bead from the seeker's
   own thread arriving on this side. */
.said-yes { border: 1.5px solid var(--honey); }

.yes-mark {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.2rem 0 0;
  font-weight: 600;
}

.yes-mark::before {
  content: '';
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: var(--bead-amber);
  box-shadow: 0 1px 2px rgba(12, 28, 52, 0.3);
  flex: none;
}

.cand-action { margin-top: auto; padding-top: 0.95rem; }
.cand-action form { margin: 0; }
.cand-action button { width: 100%; }

/* Where the question to this person stands. A dark bead is so and a pale one is
   not yet, and a no is the same quiet bead as a silence, because declining stays
   neutral on both sides. */
.ask {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}

.ask li { position: relative; padding-left: 1.35rem; }
.ask + form { margin-top: 0.8rem; }

.ask li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #FFFFFF 0 12%, #DDE4EE 48%, #AEBBCD 96%);
  box-shadow: 0 1px 2px rgba(12, 28, 52, 0.3);
}

.ask li.done { font-weight: 600; }
.ask li.done::before { background: var(--bead-ink); }

.ask .mono { white-space: nowrap; }

.ask-why { display: block; font-weight: 400; }

/* The one link on a card, so it gets a tap target rather than a line of text. */
.ask-go {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

/* The card the press came back to. */
.cand { scroll-margin-top: 0.75rem; }
.cand:target { outline: 2px solid var(--sea); outline-offset: 1px; }

/* The two fields the ladder does not cover are shown below a rule, under their own
   label, because the claim above says they are shown as given and the card should
   not quietly mix them in with the four that are laddered. */
.cand .as-given {
  grid-column: 1 / -1;
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--haze);
  font-size: 0.86rem;
  font-weight: 600;
}

/* ---- introductions already released ---- */

/* An address has no spaces, and unbroken it pushes the card past a phone's edge. */
.intro dd { overflow-wrap: anywhere; }
.intro dd a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---- the listing form ---- */

/* Article 17 owes the employer the reasons for a decision, so they are given the
   weight of a quotation rather than a footnote. */
.statements { margin: 0 0 1.35rem; }

.statements blockquote {
  margin: 0 0 0.7rem;
  padding: 0.85rem 1rem;
  background: var(--clay-pale);
  border-radius: 10px;
}

.statements blockquote:last-child { margin-bottom: 0; }

.form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.8rem;
  margin: 0 0 0.6rem;
}

.form-head .label { margin: 0; color: var(--quiet); }

/* A form is read down a column, so it keeps a measure however wide the page is. */
.narrow { max-width: 30rem; }
.listing-form { max-width: 50rem; }

/* Short fields in pairs where there is room, and the long ones across. */
.listing-form fieldset {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: 0 1rem;
  padding-bottom: 0.15rem;
}

.listing-form label:has(textarea) { grid-column: 1 / -1; }

/* What sends a saved listing on to review is the next thing to do, so it is the
   page's main action and it says what it is for. */
.resubmit { display: grid; gap: 0.5rem; justify-items: start; }
.resubmit form { flex: 0 0 auto; }

@media (min-width: 44em) {
  .ledger { grid-template-columns: auto minmax(0, 1fr); gap: 0.55rem 1.25rem; }
  .ledger dd { margin: 0; padding-left: 0; }

  /* Three columns, the last one kept even on a row with nothing in it, so the
     states of a draft line up with the states of a live listing above it. */
  .lrow { display: grid; grid-template-columns: minmax(0, 1fr) auto 9.5rem; gap: 0 1.25rem; }
  .lrow .states { grid-column: 2; justify-content: flex-end; }
  .lrow-go { grid-column: 3; }
}
