/* Source-backed case studies live inside the existing project details. */
.project-dialog.project-dialog--study { width: min(1120px,calc(100% - 40px)); }
.project-dialog--study .project-summary { max-width: 80ch; }
.project-dialog--study .project-story__body { max-width: none; }
.project-study { --study-ink: #242424; --study-muted: #666d74; --study-line: #dfe2e5; --study-soft: #f3f5f6; --study-blue: #315e8b; min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; color: var(--study-ink); font-family: var(--portfolio-sans,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif); }
.project-study [hidden] { display: none !important; }
.project-study .study-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.project-study :is(.study-button,.study-back,.study-page) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--study-line); border-radius: 999px; background: #fff; color: var(--study-ink); font: inherit; font-size: .8125rem; line-height: 1.4; text-decoration: none; cursor: pointer; transition: background-color .18s ease,border-color .18s ease; }
.project-study :is(.study-button,.study-back,.study-page):hover { background: #f3f5f6; text-decoration: none; }
.project-study .study-button--primary { background: var(--study-ink); border-color: var(--study-ink); color: #fff; }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-button--primary { color: #fff; }
.project-study .study-button--primary:hover { background: #41464a; border-color: #41464a; }
.project-study .study-back { margin: 0 0 20px; }
.project-study .study-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 28px; align-items: start; }
.project-study :is(.study-architecture,.study-report) { min-width: 0; margin: 0; padding: 0; border: 0; background: transparent; }
.project-study .study-pane-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin: 0 0 5px; }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-pane-heading h3 { margin: 0; color: var(--study-ink); font: inherit; font-size: 1rem; font-weight: 500; line-height: 1.5; letter-spacing: -.015em; }
.project-study :is(.study-text-button,.study-text-link) { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; margin: 0; padding: 0; border: 0; background: transparent; color: var(--study-blue); font: inherit; font-size: .75rem; line-height: 1.5; text-decoration: none; cursor: pointer; }
.project-study :is(.study-text-button,.study-text-link):hover { color: #1d456e; text-decoration: none; }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-caption { margin: 0 0 16px; color: var(--study-muted); font-size: .6875rem; line-height: 1.55; }
.project-study .study-map-fallback { margin: 0; }
.project-study .study-map-fallback img { display: block; width: 100%; height: auto; border-radius: 8px; }
.project-study .study-map { position: relative; display: grid; gap: 24px 10px; min-width: 0; padding: 2px; }
.project-study .study-links { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.project-study .study-node { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; min-height: 72px; padding: 12px 6px; border: 1px solid transparent; border-radius: 10px; background: var(--study-soft); color: var(--study-ink); font: inherit; text-align: center; cursor: pointer; transition: background-color .18s ease,border-color .18s ease; }
.project-study .study-node strong { font-size: .8125rem; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.project-study .study-node span { color: var(--study-muted); font-size: .6875rem; line-height: 1.4; overflow-wrap: anywhere; }
.project-study .study-node:hover { background: #edf0f2; }
.project-study .study-node[aria-pressed="true"] { border-color: #b8cce0; background: #e9f0f8; }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-map-note { margin: 14px 0; color: var(--study-muted); font-size: .6875rem; line-height: 1.6; }
.project-study .study-node-detail { min-height: 82px; padding: 12px; border-radius: 9px; background: #f7f8fa; }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-node-detail p { margin: 0 0 6px; color: #555e66; font-size: .75rem; line-height: 1.6; }
.project-study .study-node-detail a { color: var(--study-blue); font-size: .75rem; text-decoration: none; }
.project-study .study-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.project-study .study-page { min-height: 36px; padding: 5px 11px; font-size: .75rem; }
.project-study .study-page[aria-pressed="true"] { border-color: transparent; background: var(--study-soft); }
.project-study .study-paper { display: block; width: 100%; border: 0; border-radius: 4px; background: #f8f8f6; }
.project-study .study-paper img { display: block; width: 100%; height: auto; border-radius: inherit; box-shadow: 0 2px 14px rgba(0,0,0,.055); }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-page-label { margin: 10px 0 0; color: var(--study-muted); font-size: .6875rem; line-height: 1.6; }
.project-study .study-result { margin: 24px 0 0; }
.project-study .study-result > summary { width: fit-content; min-height: 44px; padding-block: 10px; color: var(--study-ink); font-size: .8125rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.project-study .study-result figure { margin: 12px 0 0; }
.project-study .study-result img { display: block; max-width: 100%; width: 100%; height: auto; border-radius: 9px; }
.project-study .study-result figcaption { margin-top: 8px; color: var(--study-muted); font-size: .6875rem; line-height: 1.6; }
.project-study .study-result figcaption a { color: var(--study-blue); text-decoration: none; }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-scope { margin: 20px 0 0; color: var(--study-muted); font-size: .75rem; line-height: 1.6; }
.project-study .study-scope strong { color: #515860; font-weight: 500; }
body.personal-journal :is(#projects,.project-dialog) .project-study .study-provenance { margin: 10px 0 0; color: var(--study-muted); font-size: .6875rem; line-height: 1.6; }
.project-study .study-provenance a { color: inherit; text-decoration: none; }
.project-study[data-study-view="architecture"] .study-grid { grid-template-columns: minmax(0,1fr); }
.project-study[data-study-view="architecture"] .study-report { display: none; }
.project-study[data-study-view="architecture"] .study-map { max-width: 720px; margin-inline: auto; }
.project-study[data-study-view="architecture"] .study-node strong { font-size: .9375rem; }
.project-study[data-study-view="architecture"] .study-node span { font-size: .75rem; }
.project-study[data-study-view="architecture"] .study-map-note, .project-study[data-study-view="architecture"] .study-node-detail { max-width: 720px; margin-inline: auto; }
@media (min-width:900px) { .project-dialog--study .project-study .study-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 32px; } .project-dialog--study .project-study[data-study-view="architecture"] .study-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width:480px) { .project-dialog.project-dialog--study { width: calc(100% - 24px); } .project-study .study-node { padding-inline: 5px; } .project-study :is(.study-page,.study-text-button,.study-text-link) { min-height: 44px; } }
@media print { .project-study :is(.study-map,.study-node-detail,.study-text-button,.study-back,.study-pages) { display: none !important; } .project-study .study-map-fallback[hidden] { display: block !important; } }
