/* Give the original application enough space to remain legible. */
.screenshot-tour-section { padding: clamp(56px, 7vw, 100px) 0; border-block: 1px solid var(--line); }
.screenshot-tour { min-width: 0; scroll-margin-top: 112px; }
.screenshot-tour-intro { max-width: 800px; margin-bottom: 32px; }
.screenshot-tour-intro h2 { font-size: clamp(32px, 4.5vw, 62px); line-height: 1.05; letter-spacing: -.045em; margin: 20px 0; }
.screenshot-tour-intro > p:last-child { max-width: 64ch; color: var(--ink-soft); line-height: 1.7; }
.screenshot-nav { display: flex; position: relative; gap: 8px; overflow-x: auto; padding: 4px 0 16px; overscroll-behavior-x: contain; scrollbar-width: thin; }
.screenshot-nav button { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; border: 1px solid var(--line); color: var(--ink); background: var(--mint); border-radius: 7px; padding: 13px 18px; cursor: pointer; font: inherit; font-size: 14px; text-align: left; }
.screenshot-nav button span { font-family: var(--font-mono, monospace); font-size: 11px; opacity: .65; }
.screenshot-nav button[aria-current="true"] { background: #95e6b4; border-color: #95e6b4; color: #10251a; }
.screenshot-nav button:hover { border-color: var(--ink); }
.screenshot-detail { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 16px 0 24px; }
.screenshot-detail h3 { font-size: clamp(23px, 2.7vw, 34px); letter-spacing: -.035em; line-height: 1.2; margin: 0 0 10px; }
.screenshot-detail p { max-width: 76ch; margin: 0; line-height: 1.65; color: var(--ink-soft); }
.screenshot-counter { flex-shrink: 0; font-family: monospace; font-size: 12px; padding-top: 8px; }
.screenshot-select-label, .screenshot-select { display: none; }
.screenshot-figure { margin: 0; }
.screenshot-frame { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #edece7; cursor: zoom-in; }
.screenshot-frame img { display: block; width: 100%; height: auto; max-width: 100%; }
.screenshot-tour.is-mobile-screenshot .screenshot-frame { display: flex; justify-content: center; padding: 24px; background: var(--mint); }
.screenshot-tour.is-mobile-screenshot .screenshot-frame img { width: auto; height: min(740px, 85vh); max-width: 100%; object-fit: contain; border-radius: 12px; }
.screenshot-caption { display: flex; justify-content: space-between; gap: 18px; margin-top: 14px; font-size: 12px; line-height: 1.6; color: var(--ink-soft); }
.screenshot-caption a { color: var(--ink); text-underline-offset: 4px; white-space: nowrap; }
.screenshot-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; }
.screenshot-controls button { font: inherit; color: var(--ink); padding: 13px 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--mint); cursor: pointer; }
.screenshot-controls button:hover { border-color: var(--ink); }
.screenshot-controls p { margin: 0; font-size: 12px; color: var(--ink-soft); }
.screenshot-error { padding: 14px; border: 1px solid currentColor; }
.original-app-preview .project-image-frame { max-width: none; }
.original-app-preview .project-image-frame img { width: 100%; height: auto; object-fit: contain; max-height: none; filter: none; transform: none; }
.original-app-preview .project-hero-stage, .original-app-preview .project-gallery-frame { display: block; padding: 0; min-height: 0; overflow: hidden; aspect-ratio: auto; background: #edece7; }
.original-app-preview a[data-screenshot-open] { display: block; cursor: zoom-in; }
.original-app-preview .project-gallery-frame .project-image-frame { position: static; padding: 0; }
.original-app-preview figcaption { line-height: 1.6; }
.molderings-page .project-hero-grid, .keinbock-page .project-hero-grid { grid-template-columns: 1fr; gap: 40px; }
.molderings-page .project-hero-copy, .keinbock-page .project-hero-copy { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px 6vw; }
.molderings-page .project-hero-copy > .system-label, .keinbock-page .project-hero-copy > .system-label { grid-column: 1 / -1; }
.molderings-page .project-hero-copy h1, .keinbock-page .project-hero-copy h1 { grid-column: 1; grid-row: 2 / span 3; margin: 0; align-self: start; font-size: clamp(44px, 5.2vw, 78px); }
.molderings-page .project-hero-copy > :is(.project-hero-lead,.project-hero-actions,.project-hero-facts), .keinbock-page .project-hero-copy > :is(.project-hero-lead,.project-hero-actions,.project-hero-facts) { grid-column: 2; margin-block: 0; }
.screenshot-is-open { overflow: hidden; }
.screenshot-dialog { width: calc(100vw - 40px); max-width: 1720px; height: calc(100dvh - 40px); max-height: none; margin: auto; padding: 0; border: 1px solid #405748; border-radius: 12px; color: var(--ink); background: var(--white); }
.screenshot-dialog::backdrop { background: rgb(4 12 8 / .85); }
.screenshot-dialog[open] { display: flex; flex-direction: column; }
.screenshot-dialog-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.screenshot-dialog-bar p { font-size: 14px; margin: 0; max-width: 65ch; }
.screenshot-dialog-bar > div { display: flex; flex-shrink: 0; gap: 8px; }
.screenshot-dialog button { padding: 10px 14px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); background: var(--mint); border: 1px solid var(--line); border-radius: 6px; }
.screenshot-dialog-body { flex: 1; min-height: 0; overflow: auto; padding: 20px; }
.screenshot-dialog-body img { display: block; width: 100%; height: 100%; object-fit: contain; }
.screenshot-dialog.is-original-size .screenshot-dialog-body img { width: auto; height: auto; max-width: none; max-height: none; margin: 0 auto; }
@media (prefers-reduced-motion: no-preference) {
 .screenshot-nav button, .screenshot-controls button { transition: background-color 140ms, border-color 140ms; }
 .screenshot-dialog[open] { animation: screenshot-enter 180ms ease-out; }
 @keyframes screenshot-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 760px) {
 .screenshot-tour { scroll-margin-top: 100px; }
 .screenshot-nav { display: none; }
 .screenshot-select-label { display: block; font-size: 12px; margin: 20px 0 8px; }
 .screenshot-select { display: block; width: 100%; color: var(--ink); background: var(--mint); border: 1px solid var(--line); border-radius: 6px; padding: 14px 10px; font: inherit; }
 .screenshot-detail { gap: 12px; }
 .screenshot-counter { font-size: 10px; }
 .screenshot-caption { display: block; }
 .screenshot-caption a { display: inline-block; margin-top: 8px; }
 .screenshot-controls button { padding: 12px; font-size: 13px; }
 .screenshot-controls p { display: none; }
 .molderings-page .project-hero-copy, .keinbock-page .project-hero-copy { display: block; }
 .molderings-page .project-hero-copy h1, .keinbock-page .project-hero-copy h1 { margin: 20px 0; }
 .molderings-page .project-hero-copy > :is(.project-hero-actions,.project-hero-facts), .keinbock-page .project-hero-copy > :is(.project-hero-actions,.project-hero-facts) { margin-top: 24px; }
 .screenshot-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); }
 .screenshot-dialog-bar { flex-wrap: wrap; gap: 10px; padding: 12px; }
 .screenshot-dialog-bar p { font-size: 12px; }
 .screenshot-dialog-bar > div { margin-left: auto; }
 .screenshot-dialog-body { padding: 8px; }
 .screenshot-tour.is-mobile-screenshot .screenshot-frame { padding: 14px; }
}

.tour-next-grid > *, .tour-hero-grid > *, .screenshot-detail > div { min-width: 0; }
.tour-next h2, .screenshot-tour-intro h2 { overflow-wrap: anywhere; }
.tour-next-actions { min-width: 0; }
.screenshot-nav button:focus-visible, .screenshot-controls button:focus-visible, .screenshot-frame:focus-visible, .screenshot-dialog button:focus-visible { outline: 3px solid var(--green-text); outline-offset: 4px; }

/* Clear the former portrait-PDF dimensions on real landscape screenshots. */
:root[data-theme] .case-study-page .original-app-preview .project-image-frame {
 display: block; position: relative; width: 100%; height: auto; min-height: 0;
 max-width: none; aspect-ratio: auto; border: 0; border-radius: 0;
 background: transparent; box-shadow: none; padding: 0; overflow: visible;
}
:root[data-theme] .case-study-page .original-app-preview .project-image-frame img {
 display: block; position: static; width: 100%; height: auto; max-height: none;
 object-fit: contain; transform: none; filter: none;
}
