.jri-page { --line: #52616b; color: var(--paper); background: var(--ink); font-size: var(--body-size); line-height: 1.65; }
.jri-page .nav { position: sticky; top: 0; z-index: 20; height: var(--nav-height,82px); margin-bottom: 0; background: var(--ink); }
.jri-page .footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px var(--space); border-top: 1px solid var(--line); font-size: .875rem; }
.jri-page .footer strong,.jri-page .footer div>span { display: block; }
.jri-page .nav-links a[aria-current] { color: var(--signal); text-decoration: underline; text-underline-offset: 8px; }
.jri-page .wrap { margin-inline: auto; padding-inline: var(--space); max-width: 1600px; }
.jri-page .receipt { padding-block: 80px; min-height: calc(100svh - 200px); }
.jri-page .receipt-reference { margin-block: 32px; overflow-wrap: anywhere; color: #c4d0d6; font-size: .875rem; }
.jri-page .breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 28px; font-size: .875rem; color: #c4d0d6; }
.jri-page .breadcrumb a,.jri-page .plain-link,.jri-page .prose a { color: var(--signal); text-decoration: underline; text-underline-offset: 5px; }
.jri-page .story-heading,.jri-page .page-heading { padding-block: 48px; }
.jri-page h1 { max-width: 22ch; font-size: clamp(2.375rem,4.5vw,4.25rem); line-height: 1.08; letter-spacing: -.04em; font-weight: 500; }
.jri-page .eyebrow { font-size: .75rem; margin-bottom: 24px; }
.jri-page .lead { margin-top: 24px; max-width: 54ch; color: #c4d0d6; font-size: clamp(1.125rem,1.65vw,1.375rem); }
.jri-page .project-facts { display: flex; gap: 32px 64px; flex-wrap: wrap; margin-block: 32px; }
.jri-page dt { font-size: .875rem; color: #aabcc7; }
.jri-page dd { margin: 8px 0 0; font-size: 1.125rem; }
.jri-page .plain-link { display: inline-flex; padding-block: 10px; min-height: 44px; }
.jri-page figure { margin: 0; }
.jri-page .story-cover { background: var(--surface); padding: 24px; }
.jri-page .image-button { display: block; position: relative; width: 100%; padding: 0; background: #202c33; text-align: left; }
.jri-page .media-load { display: block; }
.jri-page .image-button img { display: block; width: 100%; height: auto; max-height: 680px; object-fit: contain; }
.jri-page .image-action { display: block; background: #24343e; padding: 12px 16px; font-size: .875rem; min-height: 44px; }
.jri-page .image-button:hover .image-action { color: var(--signal); }
.jri-page figcaption { color: #c4d0d6; margin-top: 16px; font-size: 1rem; line-height: 1.6; }
.jri-page .article-layout { display: grid; grid-template-columns: 240px minmax(0,780px); justify-content: space-between; gap: 64px; padding-top: 64px; }
.jri-page .article-index { position: sticky; top: 114px; align-self: start; display: flex; flex-direction: column; gap: 6px; }
.jri-page .article-index>span { color: #aabcc7; font-size: .875rem; margin-bottom: 12px; }
.jri-page .article-index a { color: var(--signal); min-height: 44px; padding-block: 8px; }
.jri-page .article-copy section,.jri-page .prose section { scroll-margin-top: 120px; padding-bottom: 48px; }
.jri-page .article-copy h2,.jri-page .prose h2 { font-size: clamp(1.75rem,2.5vw,2.375rem); margin-bottom: 20px; }
.jri-page .article-copy p,.jri-page .article-copy li,.jri-page .prose p { color: #c4d0d6; max-width: 68ch; }
.jri-page .article-copy ul { padding-left: 22px; }
.jri-page .article-copy li { padding-block: 5px; }
.jri-page .section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 32px; }
.jri-page .section-head>p { max-width: 32ch; color: #c4d0d6; }
.jri-page .gallery-section { padding-block: 32px 64px; }
.jri-page .gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.jri-page .gallery-grid figure:first-child { grid-column: 1 / -1; }
.jri-page .prose { padding-bottom: 32px; }
.jri-page .image-dialog { width: min(1200px,calc(100vw - 40px)); max-height: 92svh; padding: 0; border: 1px solid #6b8496; background: var(--surface); color: var(--paper); }
.jri-page .image-dialog::backdrop { background: #070d12e8; }
.jri-page .dialog-bar { display: flex; align-items: center; gap: 20px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.jri-page .dialog-bar h2 { font-size: 1.125rem; letter-spacing: 0; margin-right: auto; }
.jri-page .dialog-bar button,.jri-page .dialog-bottom button { min-height: 44px; padding: 8px 12px; color: var(--paper); background: #263844; font-size: .9375rem; }
.jri-page .dialog-picture { max-height: 65svh; overflow: auto; }
.jri-page .dialog-picture img { display: block; width: 100%; height: auto; max-height: 65svh; object-fit: contain; }
.jri-page .dialog-picture.is-zoomed img { width: var(--native-width); height: var(--native-height); max-width: none; max-height: none; }
.jri-page .dialog-picture:not(.is-zoomed) img { width:auto; max-width:min(100%,var(--native-width,100%)); margin-inline:auto; }
.jri-page .dialog-bottom { display: grid; grid-template-columns: 44px 1fr 44px; gap: 16px; align-items: center; padding: 16px 20px; font-size: 1rem; }
.jri-page [data-photo-caption] { grid-column:2; min-width:0; overflow-wrap:anywhere; }
.jri-page .dialog-bottom.is-single { grid-template-columns:minmax(0,1fr); }
.jri-page .dialog-bottom.is-single [data-photo-caption] { grid-column:1; }
.jri-page .dialog-image-error,.jri-page .dialog-image-loading { padding: 32px; }
.jri-page .image-error { padding: 24px; }
.jri-page.gallery-open { overflow: hidden; }
@media(max-width:900px) {
  .jri-page .article-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 40px; }
  .jri-page .article-index { position: static; flex-direction: row; flex-wrap: wrap; gap: 8px 24px; }
  .jri-page .article-index>span { width: 100%; margin-bottom: 0; }
}
@media(max-width:600px) {
  .jri-page .nav-links { top: 66px; }
  .jri-page .story-heading,.jri-page .page-heading { padding-block: 32px; }
  .jri-page h1 { font-size: clamp(2.125rem,9vw,3rem); }
  .jri-page .project-facts { gap: 24px; }
  .jri-page .story-cover { padding: 12px; }
  .jri-page .section-head { display: block; }
  .jri-page .section-head>p { margin-top: 20px; }
  .jri-page .gallery-grid { grid-template-columns: 1fr; gap: 32px; }
  .jri-page .image-dialog { width: calc(100vw - 24px); }
  .jri-page .dialog-bar { flex-wrap: wrap; gap: 12px; padding: 12px; }
  .jri-page .dialog-bar h2 { width: 100%; }
  .jri-page .dialog-bar button:last-child { margin-left: auto; }
  .jri-page .dialog-bottom { padding: 12px; gap: 10px; font-size: .9375rem; }
}

/* Portfolio access stays part of the project, with a compact private form. */
.portfolio-access-page { padding-block: 32px 64px; }
.access-composition { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: clamp(32px,6vw,96px); align-items: start; margin-top: 40px; }
.access-intro h1 { font-size: clamp(2.25rem,4.6vw,4rem); line-height: 1.1; letter-spacing: -.035em; max-width: 16ch; }
.access-intro .lead { max-width: 42ch; margin-block: 24px; }
.access-thumbnail { margin: 24px 0 0; max-width: 480px; }
.access-thumbnail img { max-width: 100%; height: auto; max-height: 360px; object-fit: contain; object-position: left; }
.access-thumbnail figcaption { margin-top: 10px; font-size: .875rem; color: #b8c2c6; }
.portfolio-access-form { padding: 28px 0; border-top: 2px solid #5a91ff; scroll-margin-top: 100px; }
.portfolio-access-form h2 { font-size: 2rem; line-height: 1.15; margin: 14px 0; }
.portfolio-access-form>p { color: #b8c2c6; margin-bottom: 20px; }
.portfolio-access-form .field { margin: 24px 0 12px; }
.portfolio-access-form input[type=email] { width: 100%; min-height: 52px; font: inherit; background: #1c2327; border: 1px solid #71838d; color: #f2f3f0; padding: 12px; border-radius: 0; }
.portfolio-access-form .access-notice { font-size: .9375rem; line-height: 1.6; margin-bottom: 16px; }
.access-permission { display: flex; align-items: start; gap: 12px; font-size: 1rem; line-height: 1.5; padding-block: 8px 20px; }
.access-permission input { width: 20px; height: 20px; flex: 0 0 20px; margin-top: 2px; accent-color: #5a91ff; }
.portfolio-access-form .button { width: 100%; display: flex; justify-content: space-between; min-height: 52px; }
.access-errors { padding: 16px; border-left: 3px solid #ffb4a8; margin-block: 20px; }
.access-errors h3 { font-size: 1rem; }
.access-errors ul { padding-left: 18px; }
.access-save-status { min-height: 1.5em; margin-top: 12px; }
.honeypot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.jri-story-image img { max-height: 300px; object-fit: contain; object-position: left; }
.filter-count { color: #a3c2ff; margin-left: 6px; font-size: .875em; }
.image-dialog[open] { animation: viewer-enter 220ms cubic-bezier(.22,1,.36,1); }
@keyframes viewer-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media(max-width:760px) {
 .portfolio-access-page { padding-top: 24px; }
 .access-composition { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
 .access-intro h1 { font-size: 2rem; }
 .access-intro .lead { font-size: 1rem; margin-block: 16px; }
 .access-thumbnail { max-width:180px; margin:16px 0; }
 .access-thumbnail img { max-height:120px; width:auto; }
 .portfolio-access-form { padding-top: 20px; scroll-margin-top: 80px; }
 .portfolio-access-form h2 { font-size: 1.75rem; }
 .portfolio-access-form>p { font-size: 1rem; }
}
@media(prefers-reduced-motion:reduce) { .image-dialog[open] { animation: none; } }
.motion-reduced .image-dialog[open] { animation: none; }

.work-gallery .gallery-grid { align-items:start; }
.jri-page .work-gallery .gallery-grid figure { grid-column:auto; width:min(100%,var(--gallery-width)); justify-self:start; }
.jri-page .work-gallery .gallery-grid figure.work-wide { grid-column:1 / -1; }
.work-gallery .gallery-grid .image-button { width:100%; background:transparent; }
.work-gallery .gallery-grid img { display:block; width:auto; height:auto; max-width:100%; max-height:520px; object-fit:contain; margin-inline:auto; }
.work-gallery .story-heading { margin-bottom:24px; }
.work-gallery .gallery-section { padding-top:24px; }

.jri-category-filter { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-block:24px; }
.jri-category-filter select { background:#1c2327; color:#f2f3f0; border:1px solid #b8c2c6; padding:12px; max-width:100%; font:inherit; min-height:44px; }
.jri-category-filter button { background:#5a91ff; color:#111619; padding:12px 20px; font:inherit; min-height:44px; }
