/* The pergola pages share the site's navigation, typefaces and photo viewer. */
#content.pg-story {
  --pg-ink: #101c3b;
  --pg-muted: #394960;
  --pg-line: #d7d9d5;
  --pg-gap: clamp(20px, 3.7vw, 54px);
  --pg-side: clamp(16px, 4vw, 64px);
  width: 100%;
  max-width: none;
  margin: 0;
  color: var(--pg-ink);
}
.pg-story *, .pg-story *::before, .pg-story *::after { box-sizing: border-box; }
.pg-story .pg-shell, .pg-story .pg-opening-inner {
  width: min(calc(100% - 2 * var(--pg-side)), 1292px);
  margin-inline: auto;
}
.pg-story :is(section, article, figure, h1, h2, h3, p, dl, dt, dd) { margin: 0; }
.pg-story section { padding: 0; border: 0; min-height: 0; }
.pg-story h1, .pg-story h2, .pg-story h3 { color: inherit; text-align: start; text-wrap: balance; }
.pg-story h1 { font-size: clamp(36px, 4.2vw, 64px); line-height: 1.03; letter-spacing: -.035em; }
.pg-story h2 { font-size: clamp(26px, 2.6vw, 39px); line-height: 1.12; letter-spacing: -.027em; }
.pg-story h3 { font-size: clamp(20px, 1.7vw, 26px); line-height: 1.18; }
.pg-story p, .pg-story dd { max-width: none; font-size: 16px; color: var(--pg-muted); line-height: 1.55; text-align: start; }
.pg-story :is(a, summary, button):focus-visible { outline: 3px solid #336cbb; outline-offset: 3px; }
.pg-story .pg-opening { background: var(--paper); }
.pg-story .pg-opening-inner {
  display: grid;
  grid-template-columns: minmax(0,.76fr) minmax(0,1.24fr);
  grid-template-rows: 1fr auto 1fr;
  column-gap: var(--pg-gap);
  padding-block: clamp(16px, 2vw, 30px);
}
.pg-story .pg-heading-copy { grid-column: 1; grid-row: 1 / 3; align-self: end; }
.pg-story .pg-heading-copy p { margin-top: 17px; max-width: 46ch; font-size: clamp(16px, 1.25vw, 19px); }
.pg-story .pg-actions { grid-column: 1; grid-row: 3; align-self: start; display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; margin-top: 21px; }
.pg-story .pg-action, .pg-story .pg-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px;
  font-weight: 700; font-size: 16px; line-height: 1.25; text-decoration: none;
}
.pg-story .pg-action { padding: 12px 18px; color: var(--pg-ink); background: #f1d71e; border-radius: 5px; }
.pg-story .pg-action:hover { background: #ffe63c; }
.pg-story .pg-secondary, .pg-story .pg-inquiry-actions a:not(.pg-action) { text-decoration: underline; text-underline-offset: 4px; color: inherit; }
.pg-story .pg-opening .pg-shot { grid-column: 2; grid-row: 1 / 4; align-self: center; position: relative; }
.pg-story .pg-shot { min-width: 0; }
.pg-story .pg-open { position: relative; display: block; width: 100%; padding: 0; background: #f6f7f9; border: 0; border-radius: 5px; overflow: hidden; cursor: zoom-in; }
.pg-story .pg-open img { display: block; width: 100%; height: auto; aspect-ratio: 1.66; object-fit: cover; }
.pg-story .pg-opening .pg-open img { aspect-ratio: 1.72; object-position: 50% 59%; }
.pg-story .pg-zoom {
  display: grid; place-items: center; position: absolute; right: 10px; bottom: 10px;
  width: 32px; height: 32px; line-height: 1; border-radius: 50%;
  background: #fffffff2; color: var(--pg-ink); font: 700 19px/1 system-ui,sans-serif;
}
.pg-story .pg-open:hover .pg-zoom { background: #f1d71e; }
.pg-story figcaption { padding: 9px 0 0; color: var(--pg-ink); font-size: 16px; font-weight: 650; line-height: 1.35; text-align: start; }
.pg-story .pg-opening figcaption { position: absolute; bottom: 12px; left: 12px; max-width: calc(100% - 72px); border-radius: 3px; background: #12203ae8; color: white; font-size: 13px; padding: 5px 9px; pointer-events: none; }
.pg-story .pg-portfolio, .pg-story .pg-roof, .pg-story .pg-questions { padding-block: clamp(24px, 3.4vw, 46px); }
.pg-story .pg-photo-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(12px, 1.6vw, 24px); margin-top: 16px; }
.pg-story .pg-more { margin-top: 8px; }
.pg-story summary { list-style: none; cursor: pointer; }
.pg-story summary::-webkit-details-marker { display: none; }
.pg-story .pg-more summary, .pg-story .pg-questions summary { display: flex; align-items: center; gap: 16px; color: var(--pg-ink); font-size: 16px; line-height: 1.35; font-weight: 700; min-height: 44px; }
.pg-story .pg-more summary { width: fit-content; text-decoration: underline; text-underline-offset: 4px; }
.pg-story .pg-more summary span, .pg-story .pg-questions summary span { flex: 0 0 12px; height: 12px; position: relative; }
.pg-story summary span::before, .pg-story summary span::after { content: ''; position: absolute; top: 5px; left: 0; width: 12px; height: 2px; background: currentColor; }
.pg-story summary span::after { transform: rotate(90deg); }
.pg-story details[open] > summary span::after { transform: rotate(0); }
.pg-story .pg-settings { background: #f6f7f9; padding-block: clamp(22px, 3vw, 37px); }
.pg-story .pg-place-grid { display: grid; grid-template-columns: .85fr 1fr 1fr; gap: var(--pg-gap); align-items: start; }
.pg-story .pg-place-grid article p { margin-top: 7px; }
.pg-story .pg-roof { display: grid; grid-template-columns: .86fr 1.14fr; grid-template-rows: auto 1fr; gap: 16px var(--pg-gap); align-items: start; }
.pg-story .pg-roof-intro { grid-column: 1; }
.pg-story .pg-roof-intro p { margin-top: 8px; }
.pg-story .pg-roof .pg-shot { grid-column: 1; grid-row: 2; }
.pg-story .pg-roof .pg-open img { aspect-ratio: 2.6; }
.pg-story .pg-roof dl { grid-column: 2; grid-row: 1 / 3; }
.pg-story .pg-roof dl div { border-top: 1px solid var(--pg-line); padding: 10px 0; }
.pg-story .pg-roof dt { font-size: 18px; font-weight: 750; line-height: 1.3; }
.pg-story .pg-roof dd { margin: 3px 0 0; }
.pg-story .pg-questions { border-top: 1px solid var(--pg-line); display: grid; grid-template-columns: .86fr 1.14fr; gap: var(--pg-gap); }
.pg-story .pg-questions details { border-bottom: 1px solid var(--pg-line); }
.pg-story .pg-questions summary { justify-content: space-between; padding: 12px 0; }
.pg-story .pg-questions details p { padding: 0 24px 12px 0; }
.pg-story .pg-inquiry { padding-block: clamp(24px, 3vw, 40px); background: #162640; color: white; }
.pg-story .pg-inquiry > div { display: flex; align-items: center; gap: var(--pg-gap); justify-content: space-between; }
.pg-story .pg-inquiry p { max-width: 62ch; margin-top: 9px; color: #e3eaf4; }
.pg-story .pg-inquiry-actions { display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 15px; }
.pg-story .pg-inquiry-actions .pg-action { grid-column: span 2; justify-self: start; }
.pg-story .pg-inquiry-actions a:not(.pg-action) { display: inline-flex; align-items: center; min-height: 42px; font-size: 15px; white-space: nowrap; }
@media(max-width: 900px) {
  .pg-story .pg-opening-inner { column-gap: 20px; grid-template-columns: .9fr 1.1fr; }
  .pg-story .pg-opening .pg-open img { aspect-ratio: 1.39; }
  .pg-story .pg-place-grid { grid-template-columns: 1fr 1fr; gap: 14px 25px; }
  .pg-story .pg-place-grid > h2 { grid-column: 1 / -1; }
}
@media(max-width: 720px) {
  .pg-story .pg-opening-inner { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; row-gap: 13px; padding-block: 19px 16px; }
  .pg-story .pg-heading-copy, .pg-story .pg-opening .pg-shot, .pg-story .pg-actions { grid-column: 1; grid-row: auto; }
  .pg-story .pg-heading-copy p { margin-top: 8px; }
  .pg-story .pg-opening .pg-open img { aspect-ratio: 1.7; }
  .pg-story .pg-actions { margin: 0; }
  .pg-story .pg-roof, .pg-story .pg-questions { grid-template-columns: minmax(0,1fr); grid-template-rows: auto; gap: 14px; }
  .pg-story .pg-roof > *, .pg-story .pg-roof .pg-shot, .pg-story .pg-roof dl { grid-column: 1; grid-row: auto; }
  .pg-story .pg-inquiry > div { align-items: start; flex-direction: column; gap: 13px; }
}
@media(max-width: 600px) {
  .pg-story .pg-photo-row, .pg-story .pg-place-grid { grid-template-columns: minmax(0,1fr); }
  .pg-story .pg-photo-row { gap: 16px; margin-top: 13px; }
  .pg-story .pg-photo-row .pg-open img { aspect-ratio: 1.95; }
  .pg-story .pg-place-grid article + article { padding-top: 12px; border-top: 1px solid #cdd3d5; }
}
@media(max-width: 400px) {
  .pg-story .pg-actions { gap: 4px 12px; }
  .pg-story .pg-actions a { font-size: 15px; }
}


.pg-story h1 { font-size: clamp(32px, 3.45vw, 52px); hyphens: manual; overflow-wrap: normal; }
.pg-story .pg-zoom::before { content: ''; width: 13px; height: 13px; border: 2px solid currentColor; border-radius: 50%; transform: translate(-1px,-1px); }
.pg-story .pg-zoom::after { content: ''; position: absolute; height: 2px; width: 7px; border-radius: 2px; background: currentColor; transform: translate(6px,6px) rotate(45deg); }
@media(min-width: 721px) {
  .pg-story .pg-opening-inner { grid-template-rows: 1fr auto auto 1fr; }
  .pg-story .pg-heading-copy { grid-row: 2; min-width: 0; }
  .pg-story .pg-opening .pg-shot { grid-row: 1 / 5; }
}
dialog.pg-viewer[open] { width: min(960px, calc(100% - 24px)); background: #0d1932; color: white; overflow: auto; border-radius: 6px; }
dialog.pg-viewer[open][aria-busy="true"] { display: block; }
dialog.pg-viewer figure { margin: 0; }
dialog.pg-viewer figure img { display: block; margin: 0 auto; height: min(64vh,620px); max-height: none; width: 100%; object-fit: contain; }
dialog.pg-viewer figcaption { padding: 10px 16px 2px; font-size: 15px; text-align: center; color: white; }
dialog.pg-viewer .pg-viewer-nav { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 4px 12px 9px; }
.pg-viewer-nav button, dialog.pg-viewer .dialog-close { width: 44px; height: 44px; border: 1px solid #63718a; border-radius: 5px; background: #172846; color: white; font-size: 19px; cursor: pointer; }
.pg-viewer-nav output { font-variant-numeric: tabular-nums; min-width: 38px; text-align: center; }
dialog.pg-viewer .dialog-close { z-index: 1; }
dialog.pg-viewer .photo-load-status { min-height: min(64vh,620px); margin: 0; }
@media(max-width: 520px) {
  dialog.pg-viewer figure img, dialog.pg-viewer .photo-load-status { height: min(55vh,430px); min-height: 0; }
}
