/* One ink field ties the working sections together. It is purely decorative. */
#resources.tt-fieldnotes,
.chem-folio #chem-scenarios {
  position: relative;
  isolation: isolate;
  background-color: #0d233b;
  background-image: linear-gradient(123deg, #112e4b 0%, #0e2743 34%, #0b2039 70%, #0a1b31);
}
#resources.tt-fieldnotes::before,
.chem-folio #chem-scenarios::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, #738dab 0 .85px, transparent 1.2px) 0 0 / 5px 5px;
  opacity: .40;
  -webkit-mask-image: linear-gradient(29deg, #000 0, transparent 23%, transparent 79%, #000 100%);
  mask-image: linear-gradient(29deg, #000 0, transparent 23%, transparent 79%, #000 100%);
}

/* The drawing occupies its own part of the editable form sheet. */
#resources .tt-fieldnotes__shelf {container-type: inline-size}
#resources .tt-fieldnotes__sheet {
  display: grid;
  align-content: start;
  align-items: start;
  column-gap: clamp(.5rem, 2vw, 1.3rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 34%);
  grid-template-areas: "mast mast" "label plate" "name plate" "items plate" "action plate";
}
#resources .tt-fieldnotes__mast {grid-area: mast}
#resources .tt-fieldnotes__subtitle {grid-area: label}
#resources .tt-fieldnotes__sheet h4 {grid-area: name}
#resources .tt-fieldnotes__fields {grid-area: items}
#resources .tt-fieldnotes__download {grid-area: action;justify-self: start}
#resources .tt-fieldnotes__sheet::after {
  content: "";
  grid-area: plate;
  align-self: center;
  width: 100%;
  aspect-ratio: 360 / 205;
  background: var(--press-specimen) center / contain no-repeat;
  pointer-events: none;
}
#tt-sheet-chemistry {--press-specimen: url(pressmotion-specimen.svg)}
#tt-sheet-materials {--press-specimen: url(pressmotion-profiles.svg)}
#tt-sheet-equipment {--press-specimen: url(pressmotion-flange.svg)}
@container (max-width: 32rem) {
  #resources .tt-fieldnotes__sheet {
    grid-template-columns: minmax(0, 1fr) minmax(0, 35%);
    grid-template-areas: "mast mast" "label plate" "name name" "items items" "action action";
  }
  #resources .tt-fieldnotes__sheet::after {margin-block-start: .75rem}
}
@media (prefers-reduced-motion: no-preference) {
  #resources .tt-fieldnotes__sheet::after {
    transform: translateX(.65rem);
    transition: transform 360ms cubic-bezier(.2,.75,.25,1);
  }
  #resources .tt-fieldnotes__shelf:has(input[value="chemistry"]:checked) #tt-sheet-chemistry::after,
  #resources .tt-fieldnotes__shelf:has(input[value="materials"]:checked) #tt-sheet-materials::after,
  #resources .tt-fieldnotes__shelf:has(input[value="equipment"]:checked) #tt-sheet-equipment::after {
    transform: translateX(0);
  }
}

/* The three specimen positions echo the three request scenarios. A CMS photo takes priority. */
.chem-folio #chem-scenarios .cf-route-lead:not(:has(figure)) {
  display: grid;
  align-content: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "title" "specimens";
  row-gap: clamp(.75rem, 1.8vw, 1.5rem);
}
#chem-scenarios .cf-route-lead > h2 {grid-area: title}
#chem-scenarios .cf-route-lead:not(:has(figure))::before,
#chem-scenarios .cf-route-lead:not(:has(figure))::after {
  content: "";
  grid-area: specimens;
  width: min(100%, 24rem);
  aspect-ratio: 360 / 205;
  background: url(pressmotion-laboratory.svg) center / contain no-repeat;
  pointer-events: none;
}
#chem-scenarios .cf-route-lead::before {opacity: .48}
#chem-scenarios .cf-route-lead::after {
  clip-path: inset(0 61% 0 10%);
}
#chem-scenarios:has(.cf-scenario[open] a[href*="/analogs/"]) .cf-route-lead::after {
  clip-path: inset(0 37% 0 38%);
}
#chem-scenarios:has(.cf-scenario[open] a[href*="/custom-production/"]) .cf-route-lead::after {
  clip-path: inset(0 9% 0 62%);
}
#chem-scenarios:not(:has(.cf-scenario[open])) .cf-route-lead::after {opacity: 0}
@media (prefers-reduced-motion: no-preference) {
  #chem-scenarios .cf-route-lead::after {
    transition: clip-path 320ms cubic-bezier(.2,.75,.25,1), opacity 180ms ease-out;
  }
}
@media (max-width: 760px) {
  .chem-folio #chem-scenarios .cf-route-lead:not(:has(figure)) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 31%);
    grid-template-areas: "title specimens";
    align-items: center;
    column-gap: .6rem;
  }
}
@media (forced-colors: active) {
  #resources.tt-fieldnotes::before, .chem-folio #chem-scenarios::before,
  #resources .tt-fieldnotes__sheet::after, .chem-folio #chem-scenarios .cf-route-lead::before,
  .chem-folio #chem-scenarios .cf-route-lead::after {display: none}
}
