/* V4.2 — common editorial language and pixel-accurate navigation repairs.
   This final layer intentionally changes presentation only; V3 design tokens remain authoritative. */
:root { --v42-ease:cubic-bezier(.18,.76,.22,1); }

/* Each quotation is one editorial object: quote and author share the accent rule. */
#inizio .v4-hero-quote,
#byat .v42-epigraph,
.contact-manifesto blockquote {
 border-left:2px solid var(--brand-primary)!important;
 padding-left:clamp(12px,1.3vw,20px)!important;
 box-sizing:border-box;
}
#inizio .v4-hero-quote { display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important; width:max-content;max-width:100%;margin-bottom:0!important; }
#inizio #hero-title {font-style:italic!important;font-weight:600!important;letter-spacing:-.044em!important;}
#inizio .v4-hero-quote .hero-attribution {align-self:flex-end!important;justify-self:end!important;grid-column:auto!important;margin:0 2px 0 0!important;max-width:100%!important;font-style:normal!important;font-size:clamp(12px,.95vw,15px)!important;line-height:1.3!important;letter-spacing:normal!important;color:var(--brand-primary)!important;}
#byat .v42-epigraph {margin:0 0 7px!important;display:flex;flex-direction:column;gap:4px;min-width:0;}
#byat .v42-epigraph .bayt-epigraph {border:0!important;padding:0!important;margin:0!important;}
#byat .v42-epigraph .bayt-epigraph-author {border:0!important;padding:0!important;margin:0!important;max-width:100%;line-height:1.35!important;}
.contact-manifesto blockquote {display:flex;flex-direction:column;gap:7px;}
.contact-manifesto blockquote cite {margin:0!important;align-self:flex-end;}

@media(min-width:901px){
 /* No extraneous full-width quote row: the author stays close and the portrait fills the right-hand column. */
 #inizio .hero-glass {
  display:grid!important;grid-template-columns:minmax(0,1fr) clamp(280px,31vw,430px)!important;
  grid-template-rows:auto auto auto!important;gap:clamp(11px,1.5vw,22px) clamp(18px,3vw,44px)!important;
  align-items:start!important;max-width:min(1300px,94vw)!important;
  padding:clamp(20px,2.5vw,35px)!important;box-sizing:border-box;
 }
 #inizio .hero-copy {display:contents!important}
 #inizio .v4-hero-quote{grid-column:1!important;grid-row:1!important;min-width:0;}
 #inizio #hero-title {font-size:clamp(21px,2.1vw,37px)!important;line-height:1.2!important;max-width:100%!important;}
 #inizio #hero-title :is(.v4-quote-first,.v4-quote-second){white-space:normal!important;}
 #inizio .hero-intro.editorial-desktop {grid-column:1!important;grid-row:2!important;align-self:end!important;margin:0!important;line-height:1.48!important;max-width:none!important;}
 #inizio .hero-body-paragraph.editorial-desktop {grid-column:1!important;grid-row:3!important;align-self:start!important;margin:0!important;line-height:1.48!important;max-width:none!important;}
 #inizio .hero-glass>.hero-profile {
  grid-column:2!important;grid-row:1/4!important;justify-self:stretch!important;align-self:stretch!important;
  width:100%!important;max-width:none!important;height:auto!important;min-width:0!important;
  aspect-ratio:1!important;object-fit:cover!important;border-radius:50%!important;
 }
}
@media(max-width:900px){
 #inizio .v4-hero-quote{max-width:100%!important;margin-bottom:clamp(10px,3vw,18px)!important;}
 #inizio #hero-title {font-style:italic!important;}
 #inizio .v4-hero-quote .hero-attribution {margin:1px 0 0!important;align-self:flex-start!important;}
 #byat .v42-epigraph{gap:5px!important;margin-bottom:5px!important;}
}

/* Desktop navigation: strictly same header height; fork unfolds on arrival rather than anticipation. */
@media(min-width:901px){
 .site-header,.site-header.solid,.site-header.light,.site-header.solid.light{height:84px!important;min-height:84px!important;max-height:84px!important;}
 .v4-desktop-rail{--v42-progress-left:0px;--v42-progress-width:0px;}
 .v4-desktop-rail::before {z-index:0!important;}
 .v42-rail-progress {position:absolute;top:51px;left:var(--v42-progress-left);width:var(--v42-progress-width);height:2px;background:var(--brand-primary);z-index:1;pointer-events:none;transition:left .08s linear,width .08s linear;}
 .v4-desktop.v4-research-open .v4-research-group,
 .v4-desktop .v4-research-group {background:transparent!important;box-shadow:none!important;outline:0!important;border:0!important;}
 .v4-research-group::before,.v4-research-group::after,.v4-research-group .v4-nav-node::after {content:none!important;display:none!important;}
 .v4-research-group {transition:grid-template-columns 1.15s var(--v42-ease),flex-grow 1.15s var(--v42-ease)!important;}
 .v4-research-group>.v4-child{transition:opacity .55s ease,visibility 0s linear .55s!important;}
 .v4-desktop.v4-research-open .v4-research-group>.v4-child{transition:opacity .65s ease .36s,visibility 0s linear 0s!important;}
 .v42-research-branch{position:absolute;left:0;width:100%;height:18px;top:44px;overflow:visible;pointer-events:none;opacity:0;clip-path:inset(0 100% 0 0);transition:clip-path 1.12s var(--v42-ease),opacity .65s ease;z-index:1;}
 .v42-research-branch path{fill:none;stroke:color-mix(in srgb,var(--brand-primary) 82%,var(--brand-border));stroke-width:1;stroke-dasharray:3 3;vector-effect:non-scaling-stroke;}
 .v4-desktop.v4-research-open .v42-research-branch{opacity:1;clip-path:inset(0 0 0 0);}
 .v4-desktop-rail>.v4-nav-node,.v4-research-group>.v4-nav-node {transition:color .36s ease!important;}
 .v4-research-group>.v4-child {flex-direction:row!important;justify-content:center!important;align-items:flex-start!important;gap:4px!important;padding-top:8px!important;}
 .v4-research-group>.v4-child .v4-node-icon{width:13px!important;height:13px!important;min-width:13px!important;min-height:13px!important;aspect-ratio:1!important;opacity:.67!important;}
 .v4-research-group>.v4-child .v4-node-icon .v4-icon{width:12px!important;height:12px!important;aspect-ratio:1!important;}
 .v4-research-group>.v4-child .v4-node-label{display:inline!important;min-height:0!important;line-height:13px!important;font-size:clamp(9px,.74vw,11px)!important;white-space:nowrap!important;}
 .v4-research-group>.v4-child .v4-node-dot {top:45px!important;}
 .v4-research-group>.v4-child.is-current .v4-node-dot {top:43px!important;}
}

/* Mobile: absolute viewport-centered active page; smaller side previews and larger independent logo. */
@media(max-width:900px){
 .site-header,.site-header.solid,.site-header.light,.site-header.solid.light{height:84px!important;min-height:84px!important;max-height:84px!important;overflow:hidden!important;}
 .v4-mobile{position:relative!important;height:100%!important;display:block!important;}
 .v4-header-brand{position:absolute;left:0;top:0;height:100%;z-index:5;display:flex!important;align-items:center;background:var(--brand-plum);padding-right:5px;}
 .v4-brand{width:clamp(45px,11vw,58px)!important;min-width:45px!important;height:100%!important;}
 .v4-brand-divider{height:70%!important;}
 .v4-mobile-carousel{position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;overflow:visible!important;pointer-events:none;perspective:460px;}
 .v4-perspective-card{position:absolute!important;top:50%!important;height:56px!important;min-height:56px!important;max-height:56px!important;transform-style:preserve-3d;backface-visibility:hidden;pointer-events:auto;z-index:1;transition:transform .68s var(--v42-ease),opacity .6s ease,border-color .4s ease,background .4s ease!important;}
 .v4-perspective-card.v4-current{left:50%!important;width:clamp(108px,29vw,148px)!important;transform:translate(-50%,-50%) translateZ(12px) scale(1.01)!important;z-index:4;}
 .v4-perspective-card.v4-previous{right:calc(50% + clamp(60px,15vw,80px))!important;left:auto!important;width:clamp(58px,18vw,91px)!important;transform:translateY(-50%) rotateY(-24deg) scale(.92)!important;transform-origin:right center;z-index:2;}
 .v4-perspective-card.v4-next{left:calc(50% + clamp(60px,15vw,80px))!important;width:clamp(70px,19vw,95px)!important;transform:translateY(-50%) rotateY(22deg) scale(.93)!important;transform-origin:left center;z-index:2;}
 .v4-perspective-card.v4-next2{left:calc(50% + clamp(130px,36vw,178px))!important;width:clamp(70px,19vw,95px)!important;transform:translateY(-50%) rotateY(40deg) scale(.81)!important;opacity:.38;transform-origin:left center;z-index:1;}
 .v4-perspective-card[hidden]{visibility:hidden!important;pointer-events:none!important;opacity:0!important;}
 .v4-perspective-card :is(.v4-card-icon,.v4-card-label){position:relative;z-index:2;}
 .v4-card-label{font-size:clamp(9px,2.45vw,11px)!important;}
 .v4-current .v4-card-label{font-size:clamp(11px,3.1vw,13px)!important;}
 .v4-card-subtitle{font-size:9px!important;}
 /* Central dock control uses the viewport axis, not an unequal leftover grid column. */
 #v4-mobile-dock {grid-template-columns:auto 1fr auto!important;left:var(--page-margin)!important;right:var(--page-margin)!important;isolation:isolate;}
 #v4-mobile-dock .v4-dock-center{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(42vw,210px)!important;max-width:calc(100% - 180px)!important;justify-content:center!important;z-index:2;}
 #v4-mobile-dock .v4-dock-skip{grid-column:1!important;justify-self:start;z-index:3;}
 #v4-mobile-dock .v4-dock-actions{grid-column:3!important;justify-self:end;z-index:3;}
 #v4-mobile-dock :is(#earth-autoplay-control,#hold-animation,.v4-dock-scroll){max-width:100%!important;overflow:hidden;}
 #v4-mobile-dock :is(#earth-autoplay-control,#hold-animation) span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 #v4-mobile-dock .v4-dock-scroll{height:42px!important;min-width:48px!important;}
 /* Narrative popups: a real clickable collapse button, distinct from the text overlay. */
 #mondo .journey-note.project-note{top:calc(max(10px,env(safe-area-inset-top)) + 84px + 18px)!important;box-sizing:border-box!important;}
 #mondo .journey-note.project-note .v4-note-minimize{
  display:flex!important;align-items:center;justify-content:center;z-index:10;pointer-events:auto!important;
  width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;
  background:var(--brand-plum)!important;color:var(--brand-white)!important;border:1px solid var(--brand-border)!important;
  border-radius:50%!important;position:absolute!important;right:7px!important;top:7px!important;cursor:pointer!important;
 }
 #mondo .journey-note.project-note .v4-note-minimize[hidden]{display:none!important;}
 #mondo .journey-note.project-note.v4-note-compact{width:auto!important;max-width:min(75vw,340px)!important;min-width:0!important;min-height:48px!important;padding:6px!important;border-radius:calc(var(--brand-radius-button)*.65)!important;overflow:visible!important;right:auto!important;}
 #mondo .journey-note.project-note.v4-note-compact>p {display:none!important;}
 #mondo .journey-note.project-note.v4-note-compact .v4-note-mini{display:flex!important;align-items:center!important;justify-content:center!important;margin:0!important;max-width:100%;}
 #mondo .journey-note.project-note.v4-note-compact .v4-note-mini[hidden]{display:none!important;}
}
@media(max-width:395px){
 .v4-mobile-carousel .v4-perspective-card.v4-previous{width:57px!important;right:calc(50% + 60px)!important;}
 .v4-mobile-carousel .v4-perspective-card.v4-next{left:calc(50% + 60px)!important;}
 .v4-mobile .v4-brand{width:44px!important;min-width:44px!important;}
 #v4-mobile-dock .v4-dock-center{max-width:calc(100% - 163px)!important;}
 #v4-mobile-dock #earth-autoplay-control span{display:none!important;}
}

/* Enlarged viewer keeps the source gallery's arrows within the actual canvas (and within pointer reach). */
.portfolio-lightbox .lightbox-canvas{position:relative!important;isolation:isolate;overflow:hidden!important;}
.portfolio-lightbox .lightbox-canvas .v42-viewer-arrow{
 display:grid!important;place-items:center!important;position:absolute!important;top:50%!important;z-index:50!important;
 width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;
 border:var(--brand-border-width) solid var(--brand-border)!important;border-radius:50%!important;
 background:var(--brand-plum)!important;color:var(--brand-white)!important;transform:translateY(-50%)!important;
 font-size:30px!important;line-height:1!important;cursor:pointer;pointer-events:auto!important;touch-action:manipulation;
 box-shadow:0 4px 20px color-mix(in srgb,var(--brand-ink) 42%,transparent);
}
.portfolio-lightbox .lightbox-canvas .v42-viewer-prev{left:clamp(6px,1.5vw,22px)!important;}
.portfolio-lightbox .lightbox-canvas .v42-viewer-next{right:clamp(6px,1.5vw,22px)!important;}
.portfolio-lightbox .lightbox-canvas .v42-viewer-arrow:disabled{opacity:.22!important;pointer-events:none!important;}
.portfolio-lightbox .lightbox-canvas .v42-viewer-arrow:not(:disabled):active{background:var(--brand-primary)!important;color:var(--brand-plum)!important;}
@media(prefers-reduced-motion:reduce){.v4-perspective-card,.v4-research-group,.v42-research-branch{transition:none!important;}}
/* App.js toggles these notes' visibility every frame; hit testing must follow that state. */
@media(max-width:900px){
 #mondo .journey-note.project-note[aria-hidden="false"]{pointer-events:auto!important;}
 #mondo .journey-note.project-note[aria-hidden="true"]{pointer-events:none!important;}
 #inizio #hero-title{font-size:clamp(12px,3.55vw,22px)!important;}
 #inizio #hero-title :is(.v4-quote-first,.v4-quote-second){white-space:normal!important;}
}
