/* FiveM Lab extends the existing portfolio tokens. All visual rules are scoped. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: lab-page-out .18s ease both; }
::view-transition-new(root) { animation: lab-page-in .28s ease both; }
@keyframes lab-page-out { to { opacity: 0; } }
@keyframes lab-page-in { from { opacity: 0; transform: translateY(6px); } }

body.lab { --lab-line: rgba(255,255,255,.13); --lab-muted: #a4a4b1; --lab-accent: #b5a7ef; user-select: text; }
body.lab::before { display: none; }
body.lab::after { background: radial-gradient(ellipse 750px 520px at 82% -180px, rgba(123,97,255,.075), transparent 80%); position: absolute; height: 900px; }
.lab main { position: relative; z-index: 3; }
.lab main:focus { outline: none; box-shadow: none; }
.lab .wrap { max-width: 1392px; }
.lab section { padding-block: 0; }
.lab .nav { background: rgba(6,6,8,.82); backdrop-filter: blur(16px); }
.lab .nav-links a[aria-current] { color: var(--ink); }
.lab .nav-links a[aria-current]::after { right: 0; background: var(--lab-accent); }
.lab .btn { min-height: 48px; justify-content: center; }
.lab .btn-primary:hover { box-shadow: 0 8px 28px -15px rgba(181,167,239,.4); }
.lab .btn-ghost:hover { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.05); }
.lab a:focus-visible, .lab button:focus-visible { outline: 2px solid var(--lab-accent); outline-offset: 6px; box-shadow: none; }
.lab .skip-link:focus-visible { outline-offset: 2px; }
.lab-label { font-family: var(--f-mono); font-size: .75rem; line-height: 1.6; letter-spacing: .075em; color: var(--lab-muted); font-weight: 400; }
.lab-title-period { color: var(--lab-accent); }
.lab-round-arrow { width: 52px; height: 52px; display: grid; place-items: center; flex-shrink: 0; border: 1px solid var(--lab-line); border-radius: 50%; transition: color .25s, background .25s, transform .5s var(--ease); }
.lab-text-link { display: inline-flex; align-items: center; gap: 12px; font-size: .95rem; min-height: 44px; }
.lab-text-link svg { transition: transform .35s var(--ease); }
.lab-text-link:hover svg { transform: translate(3px,-3px); }
.lab-text-link:hover { color: var(--lab-accent); }
.lab [data-reveal] { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.lab .lab-pending { opacity: 0; transform: translateY(22px); }

/* Compact collection entries; both supplied visuals stay fully in frame. */
.lab .lab-intro { padding-top: clamp(124px, 10vw, 148px); padding-bottom: 36px; }
.lab-overline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lab-intro h1 { margin: 20px 0 26px; font-size: clamp(4.5rem, 10vw, 8rem); line-height: 1.08; font-weight: 500; letter-spacing: -.055em; }
.lab-title > span:first-child { color: var(--lab-accent); }
.lab-intro-bottom { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: end; padding-top: 26px; border-top: 1px solid var(--lab-line); }
.lab-statement { font-family: var(--f-display); font-size: clamp(1.4rem, 2.2vw, 1.95rem); font-weight: 500; line-height: 1.35; letter-spacing: -.02em; }
.lab-intro-description { color: var(--lab-muted); font-size: 1rem; line-height: 1.7; max-width: 44ch; }
.lab .lab-collections { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding-bottom: 26px; }
.lab-entry { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); min-width: 0; border: 1px solid var(--lab-line); border-radius: 18px; background: #0c0c10; overflow: hidden; transition: border-color .35s, background .35s; }
.lab-entry:hover { border-color: rgba(255,255,255,.29); background: #101015; }
.lab-entry-visual { position: relative; min-height: 258px; height: 100%; overflow: hidden; background: #08080b; border-right: 1px solid var(--hair); }
.lab-entry-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: filter .4s; }
.lab-entry:hover .lab-entry-visual img { filter: brightness(1.05); }
.lab-vehicle-image img { width: 100%; height: 100%; object-fit: contain; transform: translate3d(var(--image-x,0),var(--image-y,0),0) scale(1.001); transition: transform .85s var(--ease); }
.lab-vehicle-link:hover .lab-vehicle-image img { transform: translate3d(var(--image-x,0),var(--image-y,0),0) scale(1.015); }
.lab-image-tag { position: absolute; left: 12px; top: 12px; background: rgba(6,6,8,.79); color: #e7e7ef; border: 1px solid rgba(255,255,255,.15); border-radius: 6px; padding: 5px 9px; font: .75rem/1.6 var(--f-mono); letter-spacing: .045em; }
.lab-entry-copy { min-width: 0; padding: 25px 24px; display: flex; flex-direction: column; justify-content: center; }
.lab-entry-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.lab-entry-heading h2 { font-size: clamp(1.85rem, 2.6vw, 2.3rem); font-weight: 500; margin-top: 8px; }
.lab-entry-copy > p { color: var(--lab-muted); margin-top: 14px; line-height: 1.6; font-size: 1rem; }
.lab-entry-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px 12px; align-items: center; border-top: 1px solid var(--hair); padding-top: 17px; margin-top: 22px; }
.lab-link-label { display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 500; min-height: 28px; }
.lab-link-label svg { width: 17px; transition: transform .4s var(--ease); }
.lab-entry:hover .lab-link-label svg { transform: translateX(4px); }
.lab-vehicle-link:hover .lab-round-arrow { background: var(--ink); color: var(--void); transform: rotate(5deg); }
.lab-code-visual { position: relative; height: clamp(240px, 24vw, 320px); display: flex; flex-direction: column; justify-content: space-between; padding: 24px; border-bottom: 1px solid var(--hair); background-color: #0d0d12; background-image: linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px); background-size: 42px 42px; overflow: hidden; }
.lab-code-top, .lab-code-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font: .75rem/1.6 var(--f-mono); color: #93939f; letter-spacing: .03em; }
.lab-code-brackets { display: flex; align-items: center; justify-content: center; gap: 26px; font: 400 clamp(5rem, 8vw, 7.8rem)/1 var(--f-mono); color: #b5a7ef; opacity: .85; }
.lab-code-brackets span { transition: transform .7s var(--ease); }
.lab-code-brackets i { display: block; width: 38px; height: 2px; background: #b5a7ef; opacity: .5; transform: rotate(-45deg); }
.lab-entry:hover .lab-code-brackets span:first-child { transform: translateX(-5px); }
.lab-entry:hover .lab-code-brackets span:last-child { transform: translateX(5px); }
.lab-code-comment { color: #aaa0c6; }
.lab-endnote { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 56px; color: var(--lab-muted); font-size: .875rem; }

/* One consistent collection: three columns on wide screens, two on laptops. */
.lab .lab-page-heading { padding-top: 132px; padding-bottom: 52px; }
.lab-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: .875rem; line-height: 1.6; color: var(--lab-muted); }
.lab-crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
.lab-crumbs a:hover { color: var(--ink); }
.lab-crumbs > span[aria-hidden] { color: #656571; }
.lab-crumbs > span[aria-current] { color: #d4d4dc; }
.lab-heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-top: 34px; }
.lab-heading-row h1 { font-size: clamp(3.75rem, 8vw, 7.1rem); line-height: 1.1; font-weight: 500; letter-spacing: -.045em; }
.lab-heading-row > div { padding-bottom: 6px; }
.lab-heading-row p { font-size: 1.05rem; line-height: 1.6; color: var(--lab-muted); margin-top: 10px; }
.lab .lab-collection-heading { padding-top: 115px; padding-bottom: 32px; }
.lab-collection-heading .lab-heading-row { margin-top: 18px; }
.lab-collection-heading h1 { font-size: clamp(3rem, 5.1vw, 4.5rem); }
.lab .lab-vehicle-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 34px 24px; align-items: start; }
.lab-vehicle { min-width: 0; }
.lab-vehicle-link { display: block; border-radius: 14px; }
.lab-vehicle-image { aspect-ratio: 16/10; position: relative; overflow: hidden; border-radius: 14px; background: #0e0e12; border: 1px solid var(--hair); }
.lab-view-build { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 10px; padding: 9px 13px; border-radius: 100px; background: rgba(6,6,8,.82); color: var(--ink); font-size: .875rem; border: 1px solid rgba(255,255,255,.18); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .4s var(--ease); }
.lab-vehicle-link:hover .lab-view-build, .lab-vehicle-link:focus-visible .lab-view-build { opacity: 1; transform: none; }
.lab-vehicle-info { position: relative; display: flex; flex-wrap: wrap; gap: 12px; padding: 18px 0 0; }
.lab-vehicle-title { flex: 1; min-width: 0; }
.lab-vehicle-info h2 { font-size: clamp(1.45rem, 1.9vw, 1.75rem); line-height: 1.18; margin-top: 8px; font-weight: 500; }
.lab-vehicle-info h2 span { display: block; color: var(--lab-muted); font-size: 1rem; line-height: 1.5; font-family: var(--f-body); font-weight: 400; letter-spacing: 0; margin-top: 5px; }
.lab-vehicle-info > p { order: 3; flex-basis: 100%; color: var(--lab-muted); font-size: 1rem; line-height: 1.6; }
.lab-vehicle-info .lab-round-arrow { width: 38px; height: 38px; margin-top: 23px; }
.lab-list-bottom { margin-top: 44px; margin-bottom: 48px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lab-list-bottom p { font-size: 1rem; color: var(--lab-muted); }
@media (min-width: 1180px) { .lab .lab-vehicle-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }

/* Compact detail: copy and metadata beside a 55% image column. */
.lab .lab-project-heading { padding-top: 111px; padding-bottom: 42px; }
.lab-project-stage { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); grid-template-areas: "copy media" "specs media"; grid-template-rows: auto 1fr; align-items: start; gap: 24px 46px; margin-top: 26px; }
.lab-project-copy { grid-area: copy; min-width: 0; }
.lab-project-media { grid-area: media; min-width: 0; }
.lab-project-kicker { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; }
.lab-project-kicker .lab-label:first-child { color: var(--lab-accent); }
.lab-project-heading h1 { font-size: clamp(2.1rem, 3.8vw, 3.5rem); line-height: 1.12; font-weight: 500; letter-spacing: -.035em; }
.lab-project-heading h1 > span { display: block; font-size: .57em; font-weight: 400; letter-spacing: -.02em; color: var(--lab-muted); margin-top: 9px; line-height: 1.3; }
.lab-project-lead { font-size: 1rem; line-height: 1.65; color: var(--lab-muted); margin-top: 17px; max-width: 38ch; }
.lab-project-hero-frame { display: block; position: relative; border-radius: 14px; overflow: hidden; background: #0e0e12; border: 1px solid var(--hair); aspect-ratio: 16/9; max-height: 320px; }
.lab-project-hero-frame > img { width: 100%; height: 100%; object-fit: contain; transition: filter .3s; }
.lab-project-hero-frame:hover > img { filter: brightness(1.05); }
.lab-photo-count { position: absolute; bottom: 12px; right: 12px; display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 100px; background: rgba(6,6,8,.85); color: var(--ink); padding: 8px 12px; font: 500 .875rem/1.5 var(--f-body); }
.lab-photo-count svg { width: 17px; height: 17px; }
.lab-gallery-peek { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.lab-thumbnails { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.lab-thumbnail { display: block; width: 62px; height: 44px; overflow: hidden; border: 1px solid var(--hair-strong); background: #101014; border-radius: 6px; transition: border-color .3s, transform .3s; }
.lab-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.lab-thumbnail:hover { border-color: var(--lab-accent); transform: translateY(-2px); }
.lab-gallery-link { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 1; min-width: 0; max-width: 146px; min-height: 44px; font-size: .875rem; line-height: 1.4; }
.lab-gallery-link svg { flex-shrink: 0; width: 18px; height: 18px; }
.lab-gallery-link:hover { color: var(--lab-accent); }
.lab-specs { grid-area: specs; display: grid; grid-template-columns: 1.3fr .75fr .9fr; align-content: start; gap: 10px; border-block: 1px solid var(--lab-line); padding-block: 15px; }
.lab-specs > div { min-width: 0; }
.lab-specs dt { color: var(--lab-muted); font: .75rem/1.5 var(--f-mono); margin-bottom: 6px; }
.lab-specs dd { font-size: .9375rem; line-height: 1.5; }
.lab .lab-overview { padding-top: 45px; padding-bottom: 5px; display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; }
.lab-overview-body h2 { margin-top: 11px; font-size: 2rem; font-weight: 500; line-height: 1.12; }
.lab-overview-text { margin-top: 18px; color: var(--lab-muted); font-size: 1rem; line-height: 1.75; }
.lab-build-notes { margin-top: 0; }
.lab-build-notes li { border-top: 1px solid var(--lab-line); display: flex; gap: 20px; padding: 17px 0; }
.lab-build-notes li > .lab-label { padding-top: 2px; color: var(--lab-accent); }
.lab-build-notes h3 { font: 500 1rem/1.4 var(--f-body); letter-spacing: 0; }
.lab-build-notes p { color: var(--lab-muted); margin-top: 6px; font-size: 1rem; line-height: 1.6; }
.lab .lab-gallery { padding-top: 32px; border-top: 1px solid var(--hair); }
.lab-gallery .lab-section-heading, .lab-gallery-grid { max-width: 900px; margin-inline: auto; }
.lab-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.lab-section-heading h2 { font-size: 2rem; line-height: 1.1; font-weight: 500; margin-top: 10px; }
.lab-gallery-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 22px; }
.lab-gallery-item { min-width: 0; }
.lab-gallery-item a { display: block; border-radius: 10px; }
.lab-gallery-image { position: relative; overflow: hidden; border-radius: 10px; background: #0f0f14; aspect-ratio: 16/9; }
.lab-gallery-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease); }
.lab-gallery-item a:hover img { transform: scale(1.015); }
.lab-gallery-expand { width: 32px; height: 32px; position: absolute; right: 9px; bottom: 9px; display: grid; place-items: center; background: rgba(6,6,8,.78); border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: var(--ink); }
.lab-gallery-expand svg { width: 17px; height: 17px; }
.lab-gallery-item figcaption { display: flex; justify-content: space-between; gap: 12px; color: var(--lab-muted); margin-top: 9px; font-size: .875rem; line-height: 1.5; }
.lab-gallery-item figcaption > span:last-child { flex-shrink: 0; font: .75rem/1.8 var(--f-mono); }
.lab .lab-inquiry { padding-top: 36px; padding-bottom: 30px; }
.lab-inquiry-panel { position: relative; border-block: 1px solid var(--lab-line); padding: 32px 0; display: flex; justify-content: space-between; align-items: center; gap: 28px; }
.lab-inquiry-panel h2 { font-size: clamp(1.8rem, 2.5vw, 2.3rem); line-height: 1.16; margin-top: 12px; font-weight: 500; }
.lab-inquiry-panel p { color: var(--lab-muted); margin-top: 13px; font-size: 1rem; line-height: 1.65; }
.lab-inquiry-button { flex-shrink: 0; font-size: .9rem; padding-inline: 24px; }
.lab-next-project { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 38px; }
.lab-next-link { display: flex; align-items: center; gap: 30px; padding-block: 8px; }
.lab-next-link .lab-label { display: block; }
.lab-next-link strong { display: block; font-size: 1.1rem; font-weight: 500; margin-top: 6px; }
.lab-next-link:hover strong { color: var(--lab-accent); }
.lab-next-link svg { transition: transform .3s; }
.lab-next-link:hover svg { transform: translateX(5px); }

/* Empty scripts collection: honest and ready for later additions. */
.lab-scripts-panel { border: 1px solid var(--lab-line); border-radius: 22px; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; background: #0b0b0f; }
.lab-scripts-panel .lab-code-visual { height: 100%; min-height: 430px; border: 0; border-right: 1px solid var(--lab-line); padding: 30px; }
.lab-scripts-panel .lab-code-brackets { font-size: clamp(7rem, 12vw, 10rem); gap: 32px; }
.lab-scripts-copy { padding: clamp(32px, 4vw, 56px); align-self: center; }
.lab-scripts-copy h2 { margin-top: 18px; font-size: clamp(2.2rem, 3.6vw, 3.2rem); font-weight: 500; line-height: 1.12; }
.lab-scripts-copy p { margin-top: 22px; color: var(--lab-muted); line-height: 1.8; font-size: 1rem; max-width: 38ch; }
.lab-scripts-copy .btn { margin-top: 28px; padding-inline: 21px; font-size: .875rem; }

/* Native dialog: focus containment, Escape, arrows, full uncropped originals. */
.lab-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; background: rgba(6,6,8,.97); color: var(--ink); border: 0; padding: 24px clamp(20px, 4vw, 56px); margin: 0; overflow: hidden; }
.lab-lightbox[open] { display: flex; flex-direction: column; }
.lab-lightbox::backdrop { background: rgba(6,6,8,.9); }
.lab-lightbox-top { display: flex; align-items: center; justify-content: space-between; font: .8rem/1.5 var(--f-mono); color: var(--lab-muted); }
.lab-lightbox button { width: 48px; height: 48px; border: 1px solid var(--lab-line); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.lab-lightbox button:hover { background: #202028; }
.lab-lightbox-stage { min-height: 0; flex: 1; display: flex; align-items: center; justify-content: center; padding-block: 20px; }
.lab-lightbox-stage img { width: 100%; height: 100%; object-fit: contain; }
.lab-lightbox-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.lab-lightbox-bottom p { text-align: center; font-size: .9rem; color: #c5c5cf; }
.lab .lab-footer { position: relative; z-index: 3; padding-block: 35px 28px; }
.lab-footer-top, .lab-footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.lab-footer-divider { padding-inline: 14px; color: #6c6c76; font-weight: 400; }
.lab-footer-name { color: var(--lab-muted); font-weight: 400; }
.lab-footer-bottom { margin-top: 30px; padding-top: 23px; border-top: 1px solid var(--hair); color: var(--lab-muted); font-size: .8rem; }
.lab-footer-bottom nav { display: flex; gap: 28px; }
.lab-footer-bottom a { display: inline-flex; min-height: 32px; align-items: center; }
.lab-footer-bottom a:hover { color: var(--ink); }

@media (max-width: 1080px) {
  .lab .nav-links { gap: 24px; }
  .lab-entry-copy { padding-inline: 20px; }
  .lab-entry-visual { min-height: 265px; }
  .lab-project-stage { gap: 22px 30px; }
  .lab-thumbnail { width: 48px; }
  .lab-inquiry-panel { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 760px) {
  .lab .lab-intro { padding-top: 118px; padding-bottom: 28px; }
  .lab-intro h1 { font-size: clamp(4.25rem, 14vw, 6.5rem); margin-top: 20px; margin-bottom: 24px; }
  .lab-intro-index { display: none; }
  .lab-intro-bottom { grid-template-columns: 1fr; gap: 16px; padding-top: 22px; }
  .lab-statement { font-size: 1.45rem; }
  .lab-intro-description { max-width: 42ch; }
  .lab .lab-collections { grid-template-columns: 1fr; gap: 20px; }
  .lab-entry { grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); }
  .lab-entry-visual { min-height: 235px; }
  .lab-entry-copy { padding: 23px; }
  .lab-entry-heading h2 { font-size: 2rem; }
  .lab-entry-bottom { margin-top: 18px; }
  .lab-endnote { margin-bottom: 40px; font-size: .8rem; flex-wrap: wrap; gap: 8px 20px; }
  .lab .lab-page-heading { padding-top: 110px; padding-bottom: 30px; }
  .lab-heading-row { margin-top: 22px; align-items: flex-start; flex-direction: column; gap: 19px; }
  .lab-heading-row h1 { font-size: clamp(3.3rem, 10vw, 5rem); }
  .lab-heading-row > div { display: flex; justify-content: space-between; gap: 24px; width: 100%; align-items: flex-start; }
  .lab-heading-row p { margin-top: 0; font-size: 1rem; }
  .lab-collection-heading .lab-heading-row { margin-top: 17px; gap: 17px; }
  .lab-vehicle-info h2 { font-size: 1.5rem; }
  .lab-vehicle-info { padding-top: 16px; }
  .lab .lab-project-heading { padding-top: 103px; padding-bottom: 30px; }
  .lab-project-stage { grid-template-columns: 1fr; grid-template-areas: "copy" "specs" "media"; grid-template-rows: auto; gap: 19px; margin-top: 21px; }
  .lab-project-kicker { margin-bottom: 13px; gap: 6px 16px; }
  .lab-project-heading h1 { font-size: clamp(1.9rem, 7vw, 2.8rem); line-height: 1.14; }
  .lab-project-heading h1 > span { font-size: .65em; line-height: 1.3; margin-top: 7px; }
  .lab-project-lead { margin-top: 12px; max-width: 48ch; }
  .lab-project-hero-frame { aspect-ratio: 16/9; max-height: 280px; border-radius: 12px; }
  .lab-photo-count { right: 10px; bottom: 10px; padding: 6px 10px; }
  .lab-specs { padding-block: 12px; }
  .lab-specs dd { font-size: .875rem; }
  .lab-thumbnails { gap: 6px; }
  .lab-thumbnail { width: 54px; }
  .lab-gallery-link { max-width: 126px; }
  .lab .lab-gallery { padding-top: 25px; }
  .lab-section-heading { align-items: flex-start; flex-direction: column; gap: 13px; margin-bottom: 20px; }
  .lab-section-heading h2 { font-size: 1.8rem; margin-top: 8px; }
  .lab-gallery-grid { gap: 20px 14px; }
  .lab-gallery-image { aspect-ratio: 16/10; border-radius: 8px; }
  .lab-gallery-image img { width: 100%; height: 100%; }
  .lab-gallery-item figcaption { flex-direction: column; gap: 3px; font-size: .8125rem; }
  .lab-gallery-expand { width: 28px; height: 28px; right: 6px; bottom: 6px; }
  .lab-gallery-expand svg { width: 14px; height: 14px; }
  .lab .lab-overview { grid-template-columns: 1fr; gap: 24px; padding-top: 35px; padding-bottom: 0; }
  .lab-overview-body h2 { font-size: 1.8rem; }
  .lab-overview-text { margin-top: 14px; }
  .lab-build-notes li { gap: 17px; padding-block: 16px; }
  .lab .lab-inquiry { padding-top: 25px; padding-bottom: 24px; }
  .lab-inquiry-panel { padding-block: 26px; gap: 22px; }
  .lab-inquiry-panel h2 { font-size: 1.8rem; }
  .lab-inquiry-button { white-space: normal; width: 100%; }
  .lab-next-project { gap: 22px; padding-bottom: 30px; }
  .lab-next-link { gap: 14px; }
  .lab-next-link strong { font-size: .95rem; }
  .lab-next-project > .lab-text-link { font-size: .875rem; gap: 7px; flex-shrink: 0; }
  .lab-scripts-panel { grid-template-columns: 1fr; }
  .lab-scripts-panel .lab-code-visual { min-height: 260px; border-right: none; border-bottom: 1px solid var(--lab-line); padding: 22px; }
  .lab-scripts-panel .lab-code-brackets { font-size: 7rem; }
  .lab-scripts-copy { padding: 30px 24px; }
  .lab-scripts-copy h2 { font-size: 2.6rem; }
  .lab-scripts-copy .btn { white-space: normal; }
  .lab-list-bottom { margin-block: 30px 35px; align-items: flex-start; flex-direction: column; gap: 10px; }
  .lab-footer-top { flex-wrap: wrap; gap: 18px; }
  .lab-footer-top .nav-logo { font-size: .95rem; }
  .lab-footer-bottom { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 20px; }
  .lab-footer-bottom nav { gap: 25px; }
  .lab-lightbox { padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .lab-lightbox-bottom { gap: 12px; }
  .lab-lightbox-bottom p { font-size: .875rem; }
}
@media (max-width: 600px) {
  .lab .lab-vehicle-grid { grid-template-columns: 1fr; gap: 29px; }
  .lab-vehicle-image { aspect-ratio: 16/9; max-height: 240px; }
  .lab-vehicle-info > p { max-width: 44ch; }
}
@media (max-width: 560px) {
  .lab-entry { grid-template-columns: 1fr; }
  .lab-entry-visual { height: 205px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--hair); }
  .lab-entry-visual img { padding: 7px; }
  .lab-entry-copy { padding: 21px 22px; }
  .lab-entry-copy > p { margin-top: 11px; }
  .lab-entry-heading h2 { margin-top: 6px; font-size: 1.9rem; }
  .lab-entry-bottom { flex-wrap: nowrap; padding-top: 14px; margin-top: 16px; }
  .lab-thumbnail { width: 48px; }
}
@media (max-width: 380px) {
  .lab .wrap { padding-inline: 20px; }
  .lab-label { letter-spacing: .025em; }
  .lab-entry-copy { padding-inline: 19px; }
  .lab-link-label { gap: 6px; }
  .lab-next-project { align-items: flex-start; flex-direction: column; }
  .lab-heading-row > div { flex-wrap: wrap; gap: 10px; }
  .lab-thumbnail { width: 44px; }
  .lab-gallery-link svg { display: none; }
}
@keyframes lab-dialog-in { from { opacity: 0; } to { opacity: 1; } }
.lab-lightbox[open] { animation: lab-dialog-in .18s ease both; }
@media (hover: none) { .lab-view-build { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .lab [data-reveal] { opacity: 1; transform: none; }
  .lab [data-image-motion] img, .lab .lab-code-brackets span { transform: none !important; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
