/* The job board's pages around the browsing (job_board_browse.css): a
   listing page's layout, signed in and out, and the public board's way in
   (the sign-up band, the listing's panel, the short line at the end of the
   list and on a closed listing). The marketing layout loads it with
   page_stylesheets "job_board_pages". */

/* ------------------------------------------------------------------
   A listing page: the header and the action side by side from 1024px,
   the action right under the header on a phone.
   ------------------------------------------------------------------ */
.board-listing-page {
  display: grid;
  gap: 1rem;
  max-width: 72rem;
  min-width: 0;
}

.board-listing-grid {
  display: grid;
  gap: 1rem;
  grid-template-areas: "head" "side" "main";
  min-width: 0;
}

@media (min-width: 1024px) {
  .board-listing-grid {
    grid-template-columns: minmax(0, 1fr) 22rem;
    grid-template-areas: "head side" "main side";
    align-items: start;
  }
}

.board-listing-area-head {
  grid-area: head;
}

/* One column that may shrink below its content: a card holding a line that
   never wraps (a truncated thread row) would otherwise widen the column
   past the page. */
.board-listing-area-side {
  grid-area: side;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
}

.board-listing-area-main {
  grid-area: main;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
}

.board-side-card {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-box, 0.75rem);
  background: var(--color-base-100);
}

.board-listing-head {
  display: grid;
  gap: 0.75rem;
}

.board-listing-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.board-listing-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

/* Pay, when and open until: one tinted strip of cells split by hairlines
   (the 1px gaps show the strip's own colour). Flex, so a cell alone on
   the last row of a phone fills it. */
.board-listing-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-field, 0.5rem);
  background: var(--color-base-300);
}

.board-listing-facts > div {
  display: grid;
  flex: 1 1 8.5rem;
  align-content: start;
  gap: 0.125rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--color-primary) 6%, var(--color-base-100));
}

.board-listing-facts dt {
  font-size: 0.8125rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--color-base-content) 75%, transparent);
}

.board-listing-facts dd {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.board-listing-facts .board-listing-pay {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* Under "Open to bids": the poster's budget, as a quiet line of its own. */
.board-listing-facts .board-listing-pay-note {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--color-base-content) 70%, transparent);
}

.board-listing-facts .board-card-pay-none {
  font-size: 1rem;
  font-weight: 600;
}

.board-section-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.board-listing-section {
  display: grid;
  gap: 1rem;
}

.board-listing-text {
  max-width: 68ch;
  font-size: 1rem;
  line-height: 1.6;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* A part of the details under the description (the tasks, the visit
   days): its own small heading, set off by a hairline. */
.board-listing-part {
  display: grid;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-base-200);
}

.board-listing-label {
  font-size: 0.875rem;
  font-weight: 600;
}

/* The task lines as rows: what on the left, how much on the right. */
.board-listing-tasks {
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-field, 0.5rem);
  font-size: 0.9375rem;
}

.board-listing-tasks li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  padding: 0.625rem 0.875rem;
  overflow-wrap: anywhere;
}

.board-listing-tasks li + li {
  border-top: 1px solid var(--color-base-200);
}

.board-listing-tasks svg {
  margin-top: 0.2rem;
}

.board-listing-task-name {
  flex: 1 1 auto;
  min-width: 0;
}

.board-listing-task-quantity {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--color-base-content) 75%, transparent);
}

.board-listing-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.board-listing-days li {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  background: var(--color-base-200);
  font-size: 0.875rem;
  font-weight: 500;
}

/* The questions on the signed-out listing: each one a block, spaced
   rather than ruled. */
.board-public-questions {
  display: grid;
  gap: 0.25rem;
}

.board-public-questions .board-question + .board-question {
  border-top: 1px solid var(--color-base-200);
}

.board-question-body {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.board-muted {
  color: color-mix(in srgb, var(--color-base-content) 65%, transparent);
}

.board-poster-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------
   The public board's way in: the band at the top, the listing's panel,
   and the short line at the end of the list and on a closed listing.
   ------------------------------------------------------------------ */
.board-cta-band {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--color-base-300);
  background: color-mix(in srgb, var(--color-primary) 7%, var(--color-base-100));
}

.board-cta-inner {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .board-cta-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.board-cta-copy {
  display: grid;
  gap: 0.5rem;
  max-width: 44rem;
}

.board-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

/* The secondary text link beside a sign-up button (How it works, Browse
   open jobs): a full 44px tap target, under the button on a phone. */
.mkt .board-cta-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 639px) {
  .board-cta-actions .board-cta-link {
    flex-basis: 100%;
  }
}

.board-cta-note {
  flex-basis: 100%;
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--color-base-content) 70%, transparent);
}

.board-cta-panel {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-base-300));
  background: color-mix(in srgb, var(--color-primary) 5%, var(--color-base-100));
}

.board-cta-panel-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.mkt .board-cta-panel .board-cta-panel-button {
  justify-content: center;
  width: 100%;
  text-align: center;
  white-space: normal;
  /* The side panel is narrow, so the label can wrap; balance the lines
     instead of leaving one word alone on the second, and keep the two
     lines tight so the pill doesn't balloon. */
  text-wrap: balance;
  line-height: 1.3;
}

.board-cta-trust {
  display: grid;
  gap: 0.375rem;
  font-size: 0.8125rem;
}

.board-cta-trust li {
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
}

.board-cta-trust svg {
  margin-top: 0.15rem;
  color: var(--color-primary);
}

.board-cta-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border: 1px dashed color-mix(in srgb, var(--color-primary) 50%, var(--color-base-300));
  border-radius: var(--radius-box, 0.75rem);
  text-align: left;
}

.board-cta-compact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

/* The public board's sections sit tight under the band (the marketing
   .sec padding is for landing sections). */
.mkt .sec.board-public {
  padding: 1.25rem 0 4rem;
}

/* A listing's page sits on the pale grey, so its white cards read as
   cards instead of white on white. */
.mkt .sec.board-public-listing {
  background: var(--mist);
}

/* The marketing site keeps brand teal for large accents; on the public
   board's small text, buttons and controls the deep teal keeps AA contrast. */
.mkt .board-public,
.mkt .board-cta-band {
  --color-primary: var(--teal-deep);
}

/* ------------------------------------------------------------------
   The public board's hub pages (and its index): breadcrumbs over the
   heading, the hub's numbers, links to other hubs, how it works and the
   questions, each a plain section under the list.
   ------------------------------------------------------------------ */
.board-crumbs {
  padding: 0;
  max-width: 100%;
  overflow: visible;
}

/* Wrap onto a second line on a phone rather than scroll the page's own
   name out of view. */
.board-crumbs > ul {
  flex-wrap: wrap;
  row-gap: 0.25rem;
  white-space: normal;
}

.mkt .board-crumbs a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.board-hub-section {
  display: grid;
  gap: 0.75rem;
}

.board-hub-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.board-hub-facts > div {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-box, 0.75rem);
  background: var(--color-base-100);
}

.board-hub-facts dt {
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--color-base-content) 72%, transparent);
}

.board-hub-facts dd {
  font-size: 1.5rem;
  font-weight: 700;
}

.board-hub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mkt .board-hub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--color-base-300);
  border-radius: 999px;
  background: var(--color-base-100);
  font-weight: 500;
}

.mkt .board-hub-link:hover,
.mkt .board-hub-link:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* A hub's one line leading to How it works. */
.board-hub-how {
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-base-300);
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--color-base-content) 80%, transparent);
}

.mkt .board-hub-how a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.board-faqs {
  max-width: 48rem;
}

.board-how .board-faqs {
  gap: 1rem;
}

.board-faq {
  display: grid;
  gap: 0.25rem;
}

.board-faq h3 {
  font-weight: 600;
}

.board-faq p {
  color: color-mix(in srgb, var(--color-base-content) 80%, transparent);
}


/* ------------------------------------------------------------------
   How it works (/job-board/how-it-works): the three steps as numbered
   cards, the questions, each type of work's answer as a disclosure.
   ------------------------------------------------------------------ */
.board-how {
  gap: 2.5rem;
}

.board-how-title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
}

.board-how-steps {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .board-how-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.board-how-step {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-box, 0.75rem);
  background: var(--color-base-100);
}

.board-how-step h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.3;
}

.board-how-step p {
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--color-base-content) 80%, transparent);
}

.board-how-step-number {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-primary-content, #fff);
  font-weight: 700;
}

.board-how-trades {
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .board-how-trades {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.board-how-trade {
  border: 1px solid var(--color-base-300);
  border-radius: var(--radius-box, 0.75rem);
  background: var(--color-base-100);
}

.board-how-trade summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.625rem 1rem;
  font-weight: 600;
  list-style: none;
}

.board-how-trade summary::-webkit-details-marker {
  display: none;
}

.board-how-trade summary::after {
  content: "+";
  font-size: 1.25rem;
  line-height: 1;
  color: var(--color-primary);
}

.board-how-trade[open] summary::after {
  content: "\2212";
}

.board-how-trade summary:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-box, 0.75rem);
}

.board-how-trade p {
  padding: 0 1rem 0.75rem;
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--color-base-content) 80%, transparent);
}

.board-gone {
  display: grid;
  gap: 1rem;
  justify-items: center;
  margin-inline: auto;
}

.board-crumb-current {
  overflow-wrap: anywhere;
}

/* The public listing's photo teaser (public_job_board/_photo_teaser): one
   greyed tile per photo, nothing in it. */
.board-photo-teaser {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0;
}

.board-photo-teaser__tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 0.25rem;
  background-color: var(--color-base-200);
  color: var(--color-base-content);
  opacity: 0.45;
}

.board-photo-teaser__links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.375rem;
  margin-top: 0.25rem;
}
