/* A job's page: the plate open on its fourth side, the photograph completing it.
   The plate carries the number, the trade and its one-line summary together; the
   reading stands in one bay and the fact table beside it in the second. */

/* ---- the opening plate: figure, trade, summary, kind, with the photograph beside it ---- */
.job-opening{ padding-block: clamp(1rem, 3vh, 1.75rem) 0; display: grid; gap: 1rem; }
.job-plate{
  border-bottom: 0;
  padding-bottom: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.job-figure{ font-size: 7rem; }
.job-names{ margin: 0; }
.job-names .trade-heading{ margin: 0 0 0.4em; }
.job-line{ margin: 0; max-width: 34rem; font-size: 1.0625rem; line-height: 1.5; }
.job-kind{
  margin: 0;
  padding-top: 0.55rem;
  border-top: 1px solid currentColor;
  font-size: 1.0625rem;
}
.job-picture{ border-top: 1px solid currentColor; margin-top: 0; }
.job-picture-press{
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; color: inherit;
}
.job-picture img{ aspect-ratio: 16 / 10; }
.job-picture .tick-here-north-east{ top: -1px; }

@media (min-width: 60em){
  .job-opening{
    grid-template-columns: minmax(17rem, 22rem) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
  }
  .job-plate{
    justify-content: space-between;
    border-bottom: 1px solid currentColor;
    border-right: 0;
  }
  .job-figure{ font-size: clamp(9rem, 14vw, 13rem); }
  .job-picture{ border-top: 0; display: flex; border: 1px solid currentColor; border-left: 0; }
  .job-picture-press{ display: flex; height: 100%; }
  .job-picture img{ aspect-ratio: auto; height: 100%; min-height: 22rem; max-height: 60vh; }
  .job-plate .tick-here-north-east{ display: none; }
  .job-picture .tick-here-north-east{ top: -1px; right: -1px; }
}

/* ---- the reading and the fact table stand as two bays, one beside the other ---- */
.job-reading{
  display: grid;
  gap: 1.75rem;
  padding-block: 1.75rem var(--space-between-sections);
}
.job-words{ max-width: var(--measure-of-the-reading); }
.job-words p,
.job-lead{ margin: 0 0 1em; font-size: 1.0625rem; line-height: 1.62; }
.job-words p:last-child{ margin-bottom: 0; }

.job-facts .trade-heading{ margin-bottom: 0.7em; }
.job-facts .ruled-facts{ max-width: 35rem; font-size: var(--size-of-the-reading); }
.job-facts .ruled-facts > div{
  display: grid;
  grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1fr);
  gap: 0.25rem 1.25rem;
  align-items: baseline;
  padding-block: 0.6rem;
  border-bottom: 1px solid currentColor;
}
.job-facts .ruled-facts dt{ font-size: 0.95rem; letter-spacing: 0.03em; opacity: 0.78; }
.job-facts .ruled-facts dd{ margin: 0; text-align: left; }

@media (min-width: 60em){
  .job-reading{
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
  }
}

/* ---- the hand-off: the call on its face, the other jobs as three equal bays ---- */
.job-handoff{
  display: grid; gap: 2rem;
  padding-block: 0 var(--space-between-sections);
}
.job-call{ align-self: start; }
.job-number{
  margin: 0;
  font-family: 'Forum', serif;
  font-size: clamp(1.9rem, 6vw, 3rem);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.03em;
}
.job-number a{ display: inline-block; min-height: 2.75rem; }
.job-neighbours{ list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1.25rem; }
.job-neighbour{ display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0.1rem 1rem; align-items: start; text-decoration: none; }
.job-neighbour img{ grid-row: 1 / 3; width: 7rem; aspect-ratio: 4 / 3; object-fit: cover; }
.job-neighbour-name{
  font-family: 'Forum', 'Times New Roman', serif;
  font-size: 1.1875rem;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
.job-neighbour-kind{ font-size: 0.95rem; opacity: 0.8; }
.job-neighbour:hover .job-neighbour-name,
.job-neighbour:focus-visible .job-neighbour-name{ text-decoration-thickness: 2px; }
@media (min-width: 60em){
  .job-handoff{ grid-template-columns: minmax(20rem, 26rem) minmax(0, 1fr); gap: 3rem; align-items: start; }
  .job-neighbours{ grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 1.25rem; }
  .job-neighbour{ grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
  .job-neighbour img{ grid-row: auto; width: 100%; aspect-ratio: 4 / 3; height: auto; }
  .job-neighbour-name{ font-size: 1.25rem; }
}

/* ---- the photograph, opened large ---- */
.job-dialog{
  max-width: min(64rem, 94vw); max-height: 94vh; padding: 0.6rem;
  border: 1px solid var(--colour-of-the-ground);
  background: var(--colour-of-the-ink); color: var(--colour-of-the-ground);
}
.job-dialog::backdrop{ background: rgba(28, 42, 36, 0.9); }
.job-dialog img{ width: 100%; max-height: 78vh; object-fit: contain; }
.job-dialog-shut{ color: var(--colour-of-the-ground); }

/* ---- on a phone the last words clear the standing call control ---- */
@media (max-width: 47.99em){
  .gae-job-sheet .timetable{ padding-bottom: 3.25rem; }
}
