/* Build 19.13 repair layer.
   This file is loaded only by Stories 20-23, Approach and My Project Journey.
   Stories 01-19 remain locked to the approved Build 19.12 styles. */

/* STORIES 20-23 -------------------------------------------------------- */
.story-20-page .article-header {
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
  gap: 2rem;
}

.story-20-page .article-header .story-20-opening-image {
  width: 100%;
  max-width: none;
  aspect-ratio: 0.78;
  align-self: stretch;
  overflow: hidden;
  background: #fff;
}

.story-20-page .article-header .story-20-opening-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

.story-20-page .story-20-key-concept {
  width: min(calc(100% - (2 * var(--gutter))), 1060px);
  overflow: visible;
}

.story-20-page .story-20-wide-diagram,
.story-20-page .story-20-front-elevation {
  overflow: visible;
  background: #fff;
}

.story-20-page .story-20-wide-diagram img,
.story-20-page .story-20-front-elevation img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.story-21-page .story-technical-drawing,
.story-22-page .story-technical-drawing {
  overflow: visible;
  background: #fff;
}

.story-21-page .story-technical-drawing img,
.story-22-page .story-technical-drawing img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  filter: none !important;
  mix-blend-mode: normal;
  object-fit: contain;
  background: #fff;
}

.story-22-page .story-22-site-plan {
  width: min(calc(100% - (2 * var(--gutter))), 1040px);
}

.story-22-page .story-media-stack {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.story-23-page .story-23-context-grid {
  width: min(calc(100% - (2 * var(--gutter))), 920px);
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: start;
}

.story-23-page .story-23-context-grid .span-two,
.story-23-page .story-23-final-grid .span-two {
  grid-column: 1 / -1;
}

.story-23-page .story-23-context-grid figure,
.story-23-page .story-23-final-grid figure {
  height: auto;
  overflow: visible;
}

.story-23-page .story-23-context-grid img,
.story-23-page .story-23-final-grid img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  object-fit: contain;
}

.story-23-page .story-23-final-grid {
  width: min(calc(100% - (2 * var(--gutter))), 920px);
  grid-template-columns: minmax(0, 1.574fr) minmax(0, 1.569fr);
  align-items: start;
}

/* APPROACH ------------------------------------------------------------- */
.approach-page .content-hero {
  grid-template-columns: minmax(0, 36rem) minmax(0, 24rem);
  gap: clamp(1.5rem, 3vw, 2rem);
  overflow: visible;
}

.approach-page .content-hero .approach-illustration-frame {
  box-sizing: border-box;
  width: 100%;
  max-width: 24rem;
  min-width: 0;
  padding: 0;
  overflow: visible;
  background: #fff;
}

.approach-page .content-hero .approach-illustration-frame img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
  clip-path: none;
  object-fit: contain;
  object-position: center;
}

/* MY PROJECT JOURNEY --------------------------------------------------- */
.jp-programme-title {
  gap: 1.2rem;
}

.jp-period-toggle {
  border: 1px solid #d9d8d4;
}

.jp-period-toggle span {
  padding: 0.5rem 0.75rem;
}

.jp-programme-legend {
  gap: 1.2rem;
  margin: 0.75rem 0 0;
}

.jp-programme-legend span::before {
  width: 0.75rem;
  height: 0.5rem;
  margin-right: 0.4rem;
  border-radius: 0.5rem;
}

.jp-programme-panel .jp-gantt {
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.jp-programme-panel .jp-gantt::before {
  top: 3rem;
}

.jp-axis-years {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #d9d8d4;
}

.jp-axis-months {
  padding-top: 0.25rem;
}

.jp-programme-panel .jp-gantt-row {
  min-height: 2rem;
  min-height: 2.35cqw;
  border-top: 1px solid #e1e1de;
  border-top: 0.0681cqw solid #e1e1de;
}

.jp-programme-panel .jp-gantt-line.is-complete::after {
  background: var(--green);
}

.jp-gantt-complete-marker {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: calc(var(--actual-start) + var(--actual-length));
  display: block;
  width: 0.65rem;
  width: 0.72cqw;
  height: 0.65rem;
  height: 0.72cqw;
  border: 2px solid #fff;
  border: 0.12cqw solid #fff;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 1px var(--red);
  box-shadow: 0 0 0 0.0681cqw var(--red);
  transform: translate(-50%, -50%);
}

.jp-programme-legend .completed::before {
  border-radius: 50%;
}

.jp-today-marker {
  top: 2.6rem;
  bottom: -0.25rem;
  border-left: 2px dashed var(--red);
}

.jp-today-marker span {
  top: -2.2rem;
  left: 0.4rem;
}

.jp-search input[type="search"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  border: 1px solid #d9d8d4;
  border: 0.0681cqw solid #d9d8d4;
  border-radius: 0;
  padding: 1rem;
  padding: 1.0899cqw;
  color: #24272a;
  background: #fff;
  font: inherit;
}

.jp-search input[type="search"]::placeholder {
  color: #8b8e90;
  opacity: 1;
}

.jp-search input[type="search"]:focus-visible {
  outline: 2px solid var(--blue);
  outline: 0.18cqw solid var(--blue);
  outline-offset: 2px;
  outline-offset: 0.12cqw;
}

.jp-search button {
  border-radius: 0;
  cursor: pointer;
  font: inherit;
}

.jp-search button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.jp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.jp-search-status {
  min-height: 1.2em;
  margin: -0.3rem 0 0.8rem;
  margin: -0.35cqw 0 0.9cqw;
  color: #686b6d;
  font-size: 0.78em;
}

.jp-search-results {
  margin: 0 0 1rem;
  margin: 0 0 1.0899cqw;
  border: 1px solid #d9d8d4;
  border: 0.0681cqw solid #d9d8d4;
  padding: 1rem;
  padding: 1.0899cqw;
  background: #fbfbfa;
}

.jp-search-results h5 {
  margin: 0 0 0.7rem;
  margin: 0 0 0.75cqw;
  color: var(--red);
  font-size: 0.78em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.jp-file-results {
  display: grid;
  max-height: 10.5rem;
  max-height: 11.5cqw;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.jp-file-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.9rem;
  gap: 1cqw;
  align-items: center;
  border-top: 1px solid #e1e1de;
  border-top: 0.0681cqw solid #e1e1de;
  padding: 0.65rem 0;
  padding: 0.7cqw 0;
}

.jp-file-result:first-child {
  border-top: 0;
}

.jp-file-result label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.65rem;
  gap: 0.7cqw;
  align-items: start;
  cursor: pointer;
}

.jp-file-result input {
  margin: 0.2em 0 0;
  accent-color: var(--red);
}

.jp-file-result strong,
.jp-file-result small {
  display: block;
}

.jp-file-result small {
  margin-top: 0.15rem;
  margin-top: 0.18cqw;
  color: #737678;
}

.jp-file-result > span {
  color: var(--red);
  font-size: 0.72em;
  font-weight: 600;
  letter-spacing: 0.08em;
}

@media (max-width: 780px) {
  .story-20-page .article-header,
  .story-23-page .story-23-context-grid,
  .story-23-page .story-23-final-grid,
  .approach-page .content-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-20-page .article-header .story-20-opening-image {
    width: 100%;
    aspect-ratio: auto;
    overflow: visible;
  }

  .story-20-page .article-header .story-20-opening-image img {
    height: auto;
    object-fit: contain;
  }

  .story-23-page .story-23-context-grid .span-two,
  .story-23-page .story-23-final-grid .span-two {
    grid-column: auto;
  }

  .approach-page .content-hero .approach-illustration-frame {
    width: min(86vw, 24rem);
    margin-top: 0;
    justify-self: center;
  }
}
